--- sidplay-libs-2.1.1.orig/libsidplay/include/sidplay/sidendian.h
+++ sidplay-libs-2.1.1/libsidplay/include/sidplay/sidendian.h
@@ -16,6 +16,10 @@
  ***************************************************************************/
 /***************************************************************************
  *  $Log: sidendian.h,v $
+ *  Revision 1.6  2005/11/20 11:02:06  s_a_white
+ *  Work around for bug in gcc 4 (optimiser breaks if variable never has a
+ *  direct assignment).
+ *
  *  Revision 1.5  2001/07/03 22:44:13  s_a_white
  *  Added endian_16 to convert a 16 bit value to an array of 8s.
  *
@@ -141,7 +145,7 @@
 // Convert high-byte and low-byte to 16-bit word.
 inline uint_least16_t endian_16 (uint8_t hi, uint8_t lo)
 {
-    uint_least16_t word;
+    uint_least16_t word = 0;
     endian_16lo8 (word, lo);
     endian_16hi8 (word, hi);
     return word;
@@ -334,7 +338,7 @@
 // Swap word endian.
 inline void endian_32swap8 (uint_least32_t &dword)
 {
-    uint_least16_t lo, hi;
+    uint_least16_t lo = 0, hi = 0;
     lo = endian_32lo16 (dword);
     hi = endian_32hi16 (dword);
     endian_16swap8 (lo);
@@ -346,8 +350,8 @@
 // Convert high-byte and low-byte to 32-bit word.
 inline uint_least32_t endian_32 (uint8_t hihi, uint8_t hilo, uint8_t hi, uint8_t lo)
 {
-    uint_least32_t dword;
-    uint_least16_t word;
+    uint_least32_t dword = 0;
+    uint_least16_t word  = 0;
     endian_32lo8  (dword, lo);
     endian_32hi8  (dword, hi);
     endian_16lo8  (word,  hilo);
@@ -374,7 +378,7 @@
     defined(SID_WORDS_LITTLEENDIAN)
     *((uint_least32_t *) ptr) = dword;
 #else
-    uint_least16_t word;
+    uint_least16_t word = 0;
     ptr[0] = endian_32lo8  (dword);
     ptr[1] = endian_32hi8  (dword);
     word   = endian_32hi16 (dword);
@@ -401,7 +405,7 @@
     defined(SID_WORDS_BIGENDIAN)
     *((uint_least32_t *) ptr) = dword;
 #else
-    uint_least16_t word;
+    uint_least16_t word = 0;
     word   = endian_32hi16 (dword);
     ptr[1] = endian_16lo8  (word);
     ptr[0] = endian_16hi8  (word);
