Date: Fri, 24 Jul 2015 14:41:15 -0500 From: Pedro Giffuni <pfg@FreeBSD.org> To: Allan Jude <allanjude@freebsd.org>, Antoine Brodin <antoine@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r285803 - head/bin/ls Message-ID: <55B294DB.9020000@FreeBSD.org> In-Reply-To: <55B28D93.5090003@freebsd.org> References: <201507221958.t6MJwLEk015409@repo.freebsd.org> <CAALwa8=yxd6%2BTmNgrFNwJP_ZAjHWLhdEqumfsPgf%2BPfWCn5pFw@mail.gmail.com> <55B28D93.5090003@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------000808070703070504020901 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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. --------------000808070703070504020901 Content-Type: text/x-patch; name="libxo-printflike.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libxo-printflike.diff" 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); --------------000808070703070504020901--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55B294DB.9020000>