[Intel-gfx] [PATCH i-g-t] lib/igt_debugfs: Prevent compiler warning on unchecked printf format
Arkadiusz Hiler
arkadiusz.hiler at intel.com
Tue Aug 1 09:15:38 UTC 2017
On Thu, Jul 27, 2017 at 01:51:28AM -0300, Gabriel Krisman Bertazi wrote:
> Commit 34a54192e1fb ("lib/igt_debugfs: Add extended helper to format
> crc to string") introduced the following compiler warning:
>
> igt_debugfs.c: In function ‘igt_crc_to_string_extended’:
> igt_debugfs.c:373:4: warning: format not a string literal, argument
> types not checked [-Wformat-nonliteral]
> i == (crc->n_words - 1) ? '\0' : delimiter);
>
> This patch addresses the warning while also preventing a possible bad
> memory access access if n_words is > 64. I have no clue why we
> care about the padding size (crc_size), but since this was added
> recently, I'd rather leave it alone.
>
> Signed-off-by: Gabriel Krisman Bertazi <krisman at collabora.co.uk>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
and pushed, thanks!
--
Cheers,
Arek
More information about the Intel-gfx
mailing list