Date: Mon, 19 Dec 2016 00:39:54 -0800 From: Ravi Pokala <rpokala@mac.com> To: Sepherosa Ziehau <sepherosa@gmail.com>, Dimitry Andric <dim@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r310171 - head/sys/sys Message-ID: <9BD5034F-55A6-48F6-A391-A0877FF49702@panasas.com> In-Reply-To: <CAMOc5cw8cBUN5UZjcRJ-vM5WE0vmD2AGDZ-raKTraFz7LBR2hg@mail.gmail.com> References: <201612161949.uBGJnMol059217@repo.freebsd.org> <CAMOc5cw8cBUN5UZjcRJ-vM5WE0vmD2AGDZ-raKTraFz7LBR2hg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----Original Message----- > From: <owner-src-committers@freebsd.org> on behalf of Sepherosa Ziehau <sepherosa@gmail.com> > Date: 2016-12-18, Sunday at 23:02 > To: Dimitry Andric <dim@freebsd.org> > Cc: <src-committers@freebsd.org>, <svn-src-all@freebsd.org>, <svn-src-head@freebsd.org> > Subject: Re: svn commit: r310171 - head/sys/sys > > The following patch unbreaks the LINT builds on amd64 for me after this commit: > https://people.freebsd.org/~sephe/geom_sscanf.diff Wouldn't it be better to use the SCN macros? -Ravi (rpokala@) > Please review it. > > Thanks, > sephe > > > On Sat, Dec 17, 2016 at 3:49 AM, Dimitry Andric <dim@freebsd.org> wrote: >> Author: dim >> Date: Fri Dec 16 19:49:22 2016 >> New Revision: 310171 >> URL: https://svnweb.freebsd.org/changeset/base/310171 >> >> Log: >> Add __scanflike attributes to the kernel's sscanf() and vsscanf() >> declarations. This should help to catch future mismatches between >> format strings and arguments. >> >> MFC after: 1 week >> >> Modified: >> head/sys/sys/systm.h >> >> Modified: head/sys/sys/systm.h >> ============================================================================== >> --- head/sys/sys/systm.h Fri Dec 16 19:09:57 2016 (r310170) >> +++ head/sys/sys/systm.h Fri Dec 16 19:49:22 2016 (r310171) >> @@ -227,8 +227,8 @@ int vsnprintf(char *, size_t, const char >> int vsnrprintf(char *, size_t, int, const char *, __va_list) __printflike(4, 0); >> int vsprintf(char *buf, const char *, __va_list) __printflike(2, 0); >> int ttyprintf(struct tty *, const char *, ...) __printflike(2, 3); >> -int sscanf(const char *, char const *, ...) __nonnull(1) __nonnull(2); >> -int vsscanf(const char *, char const *, __va_list) __nonnull(1) __nonnull(2); >> +int sscanf(const char *, char const *, ...) __nonnull(1) __nonnull(2) __scanflike(2, 3); >> +int vsscanf(const char *, char const *, __va_list) __nonnull(1) __nonnull(2) __scanflike(2, 0); >> long strtol(const char *, char **, int) __nonnull(1); >> u_long strtoul(const char *, char **, int) __nonnull(1); >> quad_t strtoq(const char *, char **, int) __nonnull(1); >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-all >> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > -- > Tomorrow Will Never Die
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9BD5034F-55A6-48F6-A391-A0877FF49702>