[PATCH xserver] x86emu: Teach the debug code about varargs

Eric Anholt eric at anholt.net
Tue Jan 16 20:59:15 UTC 2018


Adam Jackson <ajax at redhat.com> writes:

> With -Wformat-nonliteral and a debug build you'd get yelled at here:
>
> ../hw/xfree86/x86emu/x86emu/debug.h:188:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
>
> To fix this, rewrite the printf code to actually use varargs and the
> appropriate format attribute. All callers of DECODE_PRINTF() pass a
> string with no % specifiers, so we pass that as the argument to
> printf("%s"). For DECODE_PRINTF2() we just pass the args through.
>
> Signed-off-by: Adam Jackson <ajax at redhat.com>

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20180116/bd6cd894/attachment.sig>


More information about the xorg-devel mailing list