Skip to contentSkip to conversation

mini-os: Add printf format checking to xenbus_printf

PATCH New Samuel Thibault 1 participant 1 message Aug 26, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mini-os: Add printf format checking to xenbus_printf

mini-os: Add printf format checking to xenbus_printf

extras/mini-os/include/xenbus.h +2 -1
diff -r 43486a7f918c extras/mini-os/include/xenbus.h
@@ -88,7 +88,8 @@ int xenbus_read_integer(const char *path
 /* Contraction of snprintf and xenbus_write(path/node). */
 char* xenbus_printf(xenbus_transaction_t xbt,
                                   const char* node, const char* path,
-                                  const char* fmt, ...);
+                                  const char* fmt, ...)
+                   __attribute__((__format__(printf, 4, 5)));
 
 /* Reset the XenBus system. */
 void fini_xenbus(void);