Re: [PATCH] rtc: Move variable into switch case statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 8 Dec 2021 20:39:15 -0800, Kees Cook wrote:
> When building with automatic stack variable initialization, GCC 12
> complains about variables defined outside of switch case statements.
> Move the variable into the case that uses it, which silences the warning:
> 
> drivers/rtc/dev.c: In function 'rtc_dev_ioctl':
> drivers/rtc/dev.c:394:30: warning: statement will never be executed [-Wswitch-unreachable]
>   394 |                         long offset;
>       |                              ^~~~~~
> 
> [...]

Applied, thanks!

[1/1] rtc: Move variable into switch case statement
      commit: ba52eac083e1598e748811ff58d259f77e4c5c4d

Best regards,
-- 
Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux