From 0eef50ec6a1184b0c3634caac272f969a3f36c88 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 15 Jul 2016 18:03:45 +0000 Subject: add missing prototypes, no code change; noticed by Christos Zoulas with -Wmissing-prototypes --- Makefile.depend | 6 +++--- configure | 3 ++- main.c | 5 ++++- man_hash.c | 4 +++- mandocdb.c | 5 ++++- mdoc_argv.c | 3 ++- mdoc_hash.c | 4 +++- 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Makefile.depend b/Makefile.depend index 98a1928b..d2d2e001 100644 --- a/Makefile.depend +++ b/Makefile.depend @@ -26,7 +26,7 @@ html.o: html.c config.h mandoc.h mandoc_aux.h out.h html.h manconf.h main.h lib.o: lib.c config.h roff.h mdoc.h libmdoc.h lib.in main.o: main.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h tag.h main.h manconf.h mansearch.h man.o: man.c config.h mandoc_aux.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h -man_hash.o: man_hash.c config.h roff.h man.h libman.h +man_hash.o: man_hash.c config.h mandoc.h roff.h man.h libmandoc.h libman.h man_html.o: man_html.c config.h mandoc_aux.h roff.h man.h out.h html.h main.h man_macro.o: man_macro.c config.h mandoc.h roff.h man.h libmandoc.h roff_int.h libman.h man_term.o: man_term.c config.h mandoc_aux.h mandoc.h roff.h man.h out.h term.h main.h @@ -40,8 +40,8 @@ manpath.o: manpath.c config.h mandoc_aux.h manconf.h mansearch.o: mansearch.c config.h mandoc.h mandoc_aux.h mandoc_ohash.h compat_ohash.h manconf.h mansearch.h mansearch_const.o: mansearch_const.c config.h mansearch.h mdoc.o: mdoc.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h -mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h -mdoc_hash.o: mdoc_hash.c config.h roff.h mdoc.h libmdoc.h +mdoc_argv.o: mdoc_argv.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h +mdoc_hash.o: mdoc_hash.c config.h mandoc.h roff.h mdoc.h libmandoc.h libmdoc.h mdoc_html.o: mdoc_html.c config.h mandoc_aux.h roff.h mdoc.h out.h html.h main.h mdoc_macro.o: mdoc_macro.c config.h mandoc.h roff.h mdoc.h libmandoc.h roff_int.h libmdoc.h mdoc_man.o: mdoc_man.c config.h mandoc_aux.h mandoc.h roff.h mdoc.h man.h out.h main.h diff --git a/configure b/configure index 04768be4..9d670b43 100755 --- a/configure +++ b/configure @@ -35,7 +35,8 @@ MANPATH_DEFAULT="/usr/share/man:/usr/X11R6/man:/usr/local/man" OSNAME= CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -f -` -CFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings" +CFLAGS="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings" +CFLAGS="${CFLAGS} -Wno-unused-parameter" LDADD= LDFLAGS= LD_OHASH= diff --git a/main.c b/main.c index 527db244..62e76c29 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.269 2016/07/12 05:18:38 kristaps Exp $ */ +/* $Id: main.c,v 1.270 2016/07/15 18:03:45 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2012, 2014-2016 Ingo Schwarze @@ -87,6 +87,9 @@ struct curparse { struct manoutput *outopts; /* output options */ }; + +int mandocdb(int, char *[]); + static int fs_lookup(const struct manpaths *, size_t ipath, const char *, const char *, const char *, diff --git a/man_hash.c b/man_hash.c index 8573994e..bb7b4665 100644 --- a/man_hash.c +++ b/man_hash.c @@ -1,4 +1,4 @@ -/* $Id: man_hash.c,v 1.34 2015/10/06 18:32:19 schwarze Exp $ */ +/* $Id: man_hash.c,v 1.35 2016/07/15 18:03:45 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2015 Ingo Schwarze @@ -24,8 +24,10 @@ #include #include +#include "mandoc.h" #include "roff.h" #include "man.h" +#include "libmandoc.h" #include "libman.h" #define HASH_DEPTH 6 diff --git a/mandocdb.c b/mandocdb.c index 6c04cb05..d5052db9 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.218 2016/07/12 05:18:38 kristaps Exp $ */ +/* $Id: mandocdb.c,v 1.219 2016/07/15 18:03:45 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011-2016 Ingo Schwarze @@ -139,6 +139,9 @@ struct mdoc_handler { uint64_t mask; /* set unless handler returns 0 */ }; + +int mandocdb(int, char *[]); + static void dbclose(int); static void dbadd(struct mpage *); static void dbadd_mlink(const struct mlink *mlink); diff --git a/mdoc_argv.c b/mdoc_argv.c index 8675bdb2..41889934 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_argv.c,v 1.107 2015/10/17 00:21:07 schwarze Exp $ */ +/* $Id: mdoc_argv.c,v 1.108 2016/07/15 18:03:45 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2012, 2014, 2015 Ingo Schwarze @@ -29,6 +29,7 @@ #include "roff.h" #include "mdoc.h" #include "libmandoc.h" +#include "roff_int.h" #include "libmdoc.h" #define MULTI_STEP 5 /* pre-allocate argument values */ diff --git a/mdoc_hash.c b/mdoc_hash.c index 476116d7..cad3c2db 100644 --- a/mdoc_hash.c +++ b/mdoc_hash.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_hash.c,v 1.26 2015/10/06 18:32:19 schwarze Exp $ */ +/* $Id: mdoc_hash.c,v 1.27 2016/07/15 18:03:45 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * Copyright (c) 2015 Ingo Schwarze @@ -26,8 +26,10 @@ #include #include +#include "mandoc.h" #include "roff.h" #include "mdoc.h" +#include "libmandoc.h" #include "libmdoc.h" static unsigned char table[27 * 12]; -- cgit v1.2.3-56-ge451