diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2017-07-27 15:12:31 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2017-07-27 15:12:31 +0000 |
commit | 4cb9002fb8e43d355030f47480bf7e1bea2e0459 (patch) | |
tree | 454e771e0faa2cb4cf11ba96c48c51136771f0ab /usr.sbin/crunchgen | |
parent | 170d4a2551cd751f6a93566dacbf635566774305 (diff) |
Mute clang's zeal for whining by providing prototypes.
Diffstat (limited to 'usr.sbin/crunchgen')
-rw-r--r-- | usr.sbin/crunchgen/crunched_main.c | 7 | ||||
-rw-r--r-- | usr.sbin/crunchgen/crunchgen.c | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/crunchgen/crunched_main.c b/usr.sbin/crunchgen/crunched_main.c index 42e5b774549..3b56e2d042d 100644 --- a/usr.sbin/crunchgen/crunched_main.c +++ b/usr.sbin/crunchgen/crunched_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crunched_main.c,v 1.6 2016/05/20 01:28:43 guenther Exp $ */ +/* $OpenBSD: crunched_main.c,v 1.7 2017/07/27 15:12:30 deraadt Exp $ */ /* * Copyright (c) 1994 University of Maryland @@ -44,6 +44,8 @@ struct stub { extern struct stub entry_points[]; +void crunched_usage(void); + static int crunched_main2(char *progname, int argc, char **argv, char **envp) { @@ -60,6 +62,7 @@ crunched_main2(char *progname, int argc, char **argv, char **envp) return ep->f(argc, argv, envp); fprintf(stderr, "%s: %s not compiled in\n", EXECNAME, progname); crunched_usage(); + return (1); } int @@ -78,7 +81,7 @@ crunched_main(int argc, char **argv, char **envp) return crunched_main2(argv[1], argc-1, argv+1, envp); } -int +void crunched_usage(void) { int columns = 0, len; diff --git a/usr.sbin/crunchgen/crunchgen.c b/usr.sbin/crunchgen/crunchgen.c index 0d559f2bd8e..4fde448f718 100644 --- a/usr.sbin/crunchgen/crunchgen.c +++ b/usr.sbin/crunchgen/crunchgen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crunchgen.c,v 1.17 2017/02/28 20:42:12 guenther Exp $ */ +/* $OpenBSD: crunchgen.c,v 1.18 2017/07/27 15:12:30 deraadt Exp $ */ /* * Copyright (c) 1994 University of Maryland @@ -955,6 +955,7 @@ prog_makefile_rules(FILE * outmk, prog_t * p) fprintf(outmk, "%s_stub.c:\n", p->name); fprintf(outmk, "\t@echo \"" + "extern int main(int argc, char **argv, char **envp);\\\n" "int _crunched_%s_stub(int argc, char **argv, char **envp)" " { return main(argc, argv, envp); }\" >$@\n", p->ident); |