WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] mini-os: Add printf format checking to xenbus_printf

Subject: [Xen-devel] [PATCH] mini-os: Add printf format checking to xenbus_printf
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Tue, 26 Aug 2008 17:47:43 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 26 Aug 2008 09:48:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
mini-os: Add printf format checking to xenbus_printf

Reported-by: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>

diff -r 43486a7f918c extras/mini-os/include/xenbus.h
--- a/extras/mini-os/include/xenbus.h   Tue Aug 26 16:38:23 2008 +0100
+++ b/extras/mini-os/include/xenbus.h   Tue Aug 26 17:44:01 2008 +0100
@@ -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);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] mini-os: Add printf format checking to xenbus_printf, Samuel Thibault <=