PNP: add printf attribute to log function
authorTom Rix <trix@redhat.com>
Mon, 21 Dec 2020 16:03:02 +0000 (08:03 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 22 Jan 2021 15:20:37 +0000 (16:20 +0100)
Attributing the function allows the compiler to more thoroughly
check the use of the function with -Wformat and similar flags.

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pnp/interface.c

index 187e4a1..602c468 100644 (file)
@@ -33,6 +33,7 @@ struct pnp_info_buffer {
 
 typedef struct pnp_info_buffer pnp_info_buffer_t;
 
+__printf(2, 3)
 static int pnp_printf(pnp_info_buffer_t * buffer, char *fmt, ...)
 {
        va_list args;