• Arnd Bergmann's avatar
    net: tg3: avoid uninitialized variable warning · e434e041
    Arnd Bergmann authored
    The tg3_set_eeprom() function correctly initializes the 'start' variable,
    but gcc generates a false warning:
    
    drivers/net/ethernet/broadcom/tg3.c: In function 'tg3_set_eeprom':
    drivers/net/ethernet/broadcom/tg3.c:12057:4: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]
    
    I have not come up with a way to restructure the code in a way that
    avoids the warning without making it less readable, so this adds an
    initialization for the declaration to shut up that warning.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e434e041
tg3.c 465 KB