Re: svn commit: r299584 - head/usr.sbin/binmiscctl
On Fri, 13 May 2016, Don Lewis wrote: Log: Mark usage() as __dead2 so that Coverity doesn't think that execution continues after the call and uses a negative array subscript. Reported by: Coverity CID: 1305629 This was just a bug in Coverity. Now it is also a style bug. usage() doesn't return since it finishes with exit() and this is marked with __dead2. It is a style bug to declare usage() and similar functions that obviously don't return as __dead2. Thus can only be obvious only obvious for static function. Coverity should do more global checking and not need this markup for some extern functions. Even lint can do that. Only about 32 of 451 declarations of usage() in /usr/src have this style bug. Bruce ___ 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-unsubscr...@freebsd.org"
svn commit: r299584 - head/usr.sbin/binmiscctl
Author: truckman Date: Fri May 13 01:14:38 2016 New Revision: 299584 URL: https://svnweb.freebsd.org/changeset/base/299584 Log: Mark usage() as __dead2 so that Coverity doesn't think that execution continues after the call and uses a negative array subscript. Reported by: Coverity CID: 1305629 Modified: head/usr.sbin/binmiscctl/binmiscctl.c Modified: head/usr.sbin/binmiscctl/binmiscctl.c == --- head/usr.sbin/binmiscctl/binmiscctl.c Fri May 13 00:58:05 2016 (r299583) +++ head/usr.sbin/binmiscctl/binmiscctl.c Fri May 13 01:14:38 2016 (r299584) @@ -133,7 +133,7 @@ static char const *cmd_sysctl_name[] = { IBE_SYSCTL_NAME_LIST }; -static void +static void __dead2 usage(const char *format, ...) { va_list args; ___ 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-unsubscr...@freebsd.org"