On 07/24/15 14:10, Allan Jude wrote:
...


The r285734 change didn't explicitly cast some references to uid_t, resulting in a segfault on i386. Clang generated a warning about this immediately while I was debugging when I duplicated the xo_emit command as a printf.

Can we teach our clang that xo_emit is printf, and so the same formatting type matching should be checked? That would be very helpful.


Perhaps something like this? (untested)

Pedro.


Index: contrib/libxo/libxo/xo.h
===================================================================
--- contrib/libxo/libxo/xo.h	(revision 285847)
+++ contrib/libxo/libxo/xo.h	(working copy)
@@ -160,10 +160,10 @@
 xo_emit_hv (xo_handle_t *xop, const char *fmt, va_list vap);
 
 int
-xo_emit_h (xo_handle_t *xop, const char *fmt, ...);
+xo_emit_h (xo_handle_t *xop, const char *fmt, ...) PRINTFLIKE(2, 3) ;
 
 int
-xo_emit (const char *fmt, ...);
+xo_emit (const char *fmt, ...) PRINTFLIKE(1, 2);
 
 int
 xo_open_container_h (xo_handle_t *xop, const char *name);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to