Uh oh!
There was an error while loading. Please reload this page.
sof-ctl: Fix -Wformat,-Wsometimes-uninitialized - #5750
Conversation
lgirdwood
commented
Apr 28, 2022
@dbaluta@paulstelian97 any comments ? |
* Use %z specifier for size types to avoid format specifier warnings on arm32 * in ctl_dump(), size_t n may be used uninitialized if ctl_data->out_fd > 0 and !ctl_data->binary. Signed-off-by: Li-Yu Yu <aaronyu@google.com>
BTW this is exactly why requesting declarations to be at the top of the function is harmful. This practice should be banned. If Pre-C99 does not even require declarations to be at the top of a function, it only requires them to be at the top of a block. SOF always had ("accidental") Even the Linux kernel moved beyond C89: https://lwn.net/Articles/885941/ And of course no other programming language requires anything like this. |
specifier warnings on arm32
if ctl_data->out_fd > 0 and !ctl_data->binary.
Signed-off-by: Li-Yu Yu aaronyu@google.com