Skip to content
  1. Jul 26, 2009
  2. Jul 23, 2009
  3. Jul 22, 2009
    • Linus Torvalds's avatar
      fbmon: work around compiler bug in gcc-2.4.2 · 3730793d
      Linus Torvalds authored
      
      
      There's some odd bug in gcc-4.2 where it miscompiles a simple loop whent
      he loop counter is of type 'unsigned char' and it should count to 128.
      
      The compiler will incorrectly decide that a trivial loop like this:
      
      	unsigned char i, ...
      
      	for (i = 0; i < 128; i++) {
      		..
      
      is endless, and will compile it to a single instruction that just
      branches to itself.
      
      This was triggered by the addition of '-fno-strict-overflow', and we
      could play games with compiler versions and go back to '-fwrapv'
      instead, but the trivial way to avoid it is to just make the loop
      induction variable be an 'int' instead.
      
      Thanks to Krzysztof Oledzki for reporting and testing and to Troy Moure
      for digging through assembler differences and finding it.
      
      Reported-and-tested-by: default avatarKrzysztof Oledzki <olel@ans.pl>
      Found-by: default avatarTroy Moure <twmoure@szypr.net>
      Gcc-bug-acked-by: default avatarIan Lance Taylor <iant@google.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3730793d
    • Takashi Iwai's avatar
      ALSA: ctxfi - Fix uninitialized error checks · 68110661
      Takashi Iwai authored
      
      
      Fix a few uninitialized error checks that were introduced recently
      mistakenlly during the clean-up:
        sound/pci/ctxfi/ctamixer.c: In function ‘get_amixer_rsc’:
        sound/pci/ctxfi/ctamixer.c:261: warning: ‘err’ may be used uninitialized in this function
        sound/pci/ctxfi/ctamixer.c: In function ‘get_sum_rsc’:
        sound/pci/ctxfi/ctamixer.c:415: warning: ‘err’ may be used uninitialized in this function
        sound/pci/ctxfi/ctsrc.c: In function ‘get_srcimp_rsc’:
        sound/pci/ctxfi/ctsrc.c:742: warning: ‘err’ may be used uninitialized in this function
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      68110661