Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 May 2016 04:18:47 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300935 - head/usr.sbin/rpc.statd
Message-ID:  <201605290418.u4T4IlWI057643@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Sun May 29 04:18:47 2016
New Revision: 300935
URL: https://svnweb.freebsd.org/changeset/base/300935

Log:
  Mark out_of_mem(..) and usage(..) with __dead2 as they both directly call exit
  as a hint to static analysis tools
  
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/usr.sbin/rpc.statd/statd.c

Modified: head/usr.sbin/rpc.statd/statd.c
==============================================================================
--- head/usr.sbin/rpc.statd/statd.c	Sun May 29 04:02:02 2016	(r300934)
+++ head/usr.sbin/rpc.statd/statd.c	Sun May 29 04:18:47 2016	(r300935)
@@ -72,9 +72,9 @@ static int	create_service(struct netconf
 static void	complete_service(struct netconfig *nconf, char *port_str);
 static void	clearout_service(void);
 static void handle_sigchld(int sig);
-void out_of_mem(void);
+void out_of_mem(void) __dead2;
 
-static void usage(void);
+static void usage(void) __dead2;
 
 int
 main(int argc, char **argv)
@@ -613,7 +613,7 @@ clearout_service(void)
 }
 
 static void
-usage()
+usage(void)
 {
       fprintf(stderr, "usage: rpc.statd [-d] [-h <bindip>] [-p <port>]\n");
       exit(1);
@@ -647,7 +647,7 @@ static void handle_sigchld(int sig __unu
  * Out of memory, fatal
  */
 void
-out_of_mem()
+out_of_mem(void)
 {
 
 	syslog(LOG_ERR, "out of memory");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605290418.u4T4IlWI057643>