]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
xenstore: check formats of trace
authorNorbert Manthey <nmanthey@amazon.de>
Fri, 26 Feb 2021 14:41:37 +0000 (15:41 +0100)
committerJulien Grall <jgrall@amazon.com>
Wed, 3 Mar 2021 18:13:12 +0000 (18:13 +0000)
When passing format strings to the trace function, allow gcc to analyze
those and warn on issues.

Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
Reviewed-by: Thomas Friebel <friebelt@amazon.de>
Reviewed-by: Julien Grall <jgrall@amazon.co.uk>
Reviewed-by: Juergen Gross <jgross@suse.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
tools/xenstore/xenstored_core.h

index 589699e8336555a7113048f41b9a3cfa472cfe81..0c9a0961b57eada1811eb25594a035668e4e9166 100644 (file)
@@ -217,7 +217,7 @@ int delay_request(struct connection *conn, struct buffered_data *in,
 /* Tracing infrastructure. */
 void trace_create(const void *data, const char *type);
 void trace_destroy(const void *data, const char *type);
-void trace(const char *fmt, ...);
+void trace(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
 void dtrace_io(const struct connection *conn, const struct buffered_data *data, int out);
 void reopen_log(void);
 void close_log(void);