Re: [PATCH v2] xen/xenbus: fix W=1 build warning in xenbus_va_dev_error function

From: Jürgen Groß
Date: Fri Jun 20 2025 - 05:50:56 EST


On 20.06.25 02:41, jiang.peng9@xxxxxxxxxx wrote:
From: Peng Jiang <jiang.peng9@xxxxxxxxxx>

This patch fixes a W=1 format-string warning reported by GCC 12.3.0
by annotating xenbus_switch_fatal() and xenbus_va_dev_error()
with the __printf attribute. The attribute enables compile-time
validation of printf-style format strings in these functions.

The original warning trace:
drivers/xen/xenbus/xenbus_client.c:304:9: warning: function 'xenbus_va_dev_error' might be
a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]

Signed-off-by: Peng Jiang <jiang.peng9@xxxxxxxxxx>

Reviewed-by: Juergen Gross <jgross@xxxxxxxx>


Juergen

PS: Next time please don't send another version of a patch as a reply,
but as a new email thread.

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature