Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Sep 2017 17:20:47 +0000 (UTC)
From:      Ryan Libby <rlibby@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r323276 - head/usr.sbin/crunch/crunchgen
Message-ID:  <201709071720.v87HKlmk048946@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rlibby
Date: Thu Sep  7 17:20:47 2017
New Revision: 323276
URL: https://svnweb.freebsd.org/changeset/base/323276

Log:
  crunchgen: quiet -Wmissing-prototypes
  
  Reviewed by:	emaste (previous version)
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D12107

Modified:
  head/usr.sbin/crunch/crunchgen/crunched_main.c
  head/usr.sbin/crunch/crunchgen/crunchgen.c

Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c
==============================================================================
--- head/usr.sbin/crunch/crunchgen/crunched_main.c	Thu Sep  7 16:54:47 2017	(r323275)
+++ head/usr.sbin/crunch/crunchgen/crunched_main.c	Thu Sep  7 17:20:47 2017	(r323276)
@@ -47,6 +47,8 @@ struct stub {
 extern char *__progname;
 extern struct stub entry_points[];
 
+static void crunched_usage(void);
+
 int
 main(int argc, char **argv, char **envp)
 {
@@ -72,22 +74,6 @@ main(int argc, char **argv, char **envp)
 
 
 int
-crunched_here(char *path)
-{
-    char *slash, *basename;
-    struct stub *ep;
-
-    slash = strrchr(path, '/');
-    basename = slash? slash+1 : path;
-
-    for(ep=entry_points; ep->name != NULL; ep++)
-	if(!strcmp(basename, ep->name))
-	    return 1;
-    return 0;
-}
-
-
-int
 crunched_main(int argc, char **argv, char **envp)
 {
     char *slash;
@@ -104,7 +90,7 @@ crunched_main(int argc, char **argv, char **envp)
 }
 
 
-int
+static void
 crunched_usage()
 {
     int columns, len;

Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c
==============================================================================
--- head/usr.sbin/crunch/crunchgen/crunchgen.c	Thu Sep  7 16:54:47 2017	(r323275)
+++ head/usr.sbin/crunch/crunchgen/crunchgen.c	Thu Sep  7 17:20:47 2017	(r323276)
@@ -1105,6 +1105,7 @@ prog_makefile_rules(FILE *outmk, prog_t *p)
 
 	fprintf(outmk, "%s_stub.c:\n", p->name);
 	fprintf(outmk, "\techo \""
+	    "extern int main(int argc, char **argv, char **envp); "
 	    "int _crunched_%s_stub(int argc, char **argv, char **envp)"
 	    "{return main(argc,argv,envp);}\" >%s_stub.c\n",
 	    p->ident, p->name);



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