Re: [PATCH] xfer-opitons: Fix -Wformat=2 warnings

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

 



On Sat, Dec 21, 2019 at 06:54:58PM -0800, Rosen Penev wrote:
> Allows the compiler to check types.
> 
> format string functions expect constant expressions, not constant
> variables.
> 
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
> ---
>  axfer/xfer-options.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)

Reviewd-by: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx>

According to reference manual of GCC[1], '-Wformat=2' is a easy helper to
enable below options:
 * -Wformat
 * -Wformat-nonliteral
 * -Wformat-security
 * -Wformat-y2k

Your fix suppresses the warning from '-Wformat-nonliteral'. I'd like
maintainers to revise the title of patch.

[1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html


Regards

Takashi Sakamoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux