• Arnd Bergmann's avatar
    rtc: pfc8563: fix uninitialized variable warning · cd1420d3
    Arnd Bergmann authored
    Gcc is unable to prove that alm_pending is always initialized
    when it is used, so it prints a harmless warning:
    
    drivers/rtc/rtc-pcf8563.c: In function 'pcf8563_probe':
    drivers/rtc/rtc-pcf8563.c:449:5: warning: 'alm_pending' may be used uninitialized in this function [-Wmaybe-uninitialized]
    
    This uses the same conditional expression that is used inside of
    the pcf8563_get_alarm_mode() function, to help gcc figure it out
    and shut up that warning, and make the ARM defconfigs build again
    with no warnings.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Fixes: a45d528a ("rtc: pcf8563: clear expired alarm at boot time")
    Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
    cd1420d3
rtc-pcf8563.c 12.9 KB