crunchgen: quiet -Wmissing-prototypes

Reviewed by:	emaste (previous version)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12107
This commit is contained in:
Ryan Libby 2017-09-07 17:20:47 +00:00
parent 014404db1a
commit e881ec1646
2 changed files with 4 additions and 17 deletions

View File

@ -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)
{
@ -71,22 +73,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)
{
@ -104,7 +90,7 @@ crunched_main(int argc, char **argv, char **envp)
}
int
static void
crunched_usage()
{
int columns, len;

View File

@ -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);