Re: [PATCH] Fix snprintf format warnings during 'alsa' kselftest compilation

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

 



On Thu, Feb 23, 2023 at 11:14:56PM +0300, Ivan Orlov wrote:

> I compiled the test via gcc 11.3.0 without any custom options, the arch is
> x86_64. There were five warnings during the test compilation, and all of
> them were caused by incorrect format in 'snprintf' function calls. As I
> know, using incorrect format in 'snprintf' creates an undefined behavior.
> Maybe there is a point to fix it?

The question is more where does the warning come from and is this a good
fix - a common pattern where generic types like size_t get used is that
the underlying type changes between platforms and warnings just get
moved about by changing the printf format around.

Attachment: signature.asc
Description: PGP signature


[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