From: Ralph Corderoy Date: Mon, 15 May 2017 13:12:21 +0000 (+0100) Subject: Specify function parameters in prototypes, mainly void. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/3b819525f14d5c7653404b11c68b49981f8ff7af?ds=sidebyside;hp=--cc Specify function parameters in prototypes, mainly void. These prototypes are all in *.[cl] source compared with the *.h of the earlier commit. All but one had void added, that one's parameter was a char pointer. --- 3b819525f14d5c7653404b11c68b49981f8ff7af diff --git a/sbr/check_charset.c b/sbr/check_charset.c index 88026666..545aab46 100644 --- a/sbr/check_charset.c +++ b/sbr/check_charset.c @@ -17,7 +17,7 @@ char *norm_charmap(char *); * Get the current character set */ char * -get_charset () +get_charset(void) { return norm_charmap(nl_langinfo (CODESET)); } diff --git a/sbr/ctype-checked.c b/sbr/ctype-checked.c index 65b1cf31..4f2a15d3 100644 --- a/sbr/ctype-checked.c +++ b/sbr/ctype-checked.c @@ -44,6 +44,6 @@ int ctype_identity[257] = { /* Need to put a symbol in the .c file with NDEBUG so the compilation * unit isn't empty. */ -void ctype_checked(); +void ctype_checked(void); #endif diff --git a/sbr/icalendar.l b/sbr/icalendar.l index c1e2162b..11006e79 100644 --- a/sbr/icalendar.l +++ b/sbr/icalendar.l @@ -13,7 +13,7 @@ #include "sbr/icalparse.h" static char *unfold (char *, size_t *); -static void destroy_icallex (); +static void destroy_icallex(void); %} /* @@ -312,7 +312,7 @@ unfold (char *text, size_t *leng) { * with something other than flex. */ static void -destroy_icallex () { +destroy_icallex(void) { #if defined FLEX_SCANNER && defined YY_FLEX_SUBMINOR_VERSION /* Hack: rely on fact that the the YY_FLEX_SUBMINOR_VERSION #define was added to flex (flex.skl v. 2.163) after diff --git a/sbr/m_mktemp.c b/sbr/m_mktemp.c index f4d5c3fa..338302c0 100644 --- a/sbr/m_mktemp.c +++ b/sbr/m_mktemp.c @@ -319,7 +319,7 @@ m_unlink(const char *pathname) { * Remove all registered temporary files. */ void -remove_registered_files_atexit() { +remove_registered_files_atexit(void) { unregister_for_removal(1); } diff --git a/sbr/oauth.c b/sbr/oauth.c index 741cacb0..ccc2ad3c 100755 --- a/sbr/oauth.c +++ b/sbr/oauth.c @@ -240,7 +240,7 @@ set_err_http(mh_oauth_ctx *ctx, const struct curl_ctx *curl_ctx) } static char * -make_user_agent() +make_user_agent(void) { const char *curl = curl_version_info(CURLVERSION_NOW)->version; return concat(user_agent, " libcurl/", curl, NULL); diff --git a/sbr/signals.c b/sbr/signals.c index 39a01b32..97ac780c 100644 --- a/sbr/signals.c +++ b/sbr/signals.c @@ -84,7 +84,7 @@ SIGNAL2 (int sig, SIGNAL_HANDLER func) * For use by nmh_init(). */ int -setup_signal_handlers() { +setup_signal_handlers(void) { /* * Catch HUP, INT, QUIT, and TERM so that we can clean up tmp * files when the user terminates the process early. And also a diff --git a/sbr/utils.c b/sbr/utils.c index ef7df4aa..08ad0c1a 100644 --- a/sbr/utils.c +++ b/sbr/utils.c @@ -10,10 +10,10 @@ #include /* sbr/signals.c */ -extern int setup_signal_handlers(); +extern int setup_signal_handlers(void); /* sbr/m_mktemp.c */ -extern void remove_registered_files_atexit(); +extern void remove_registered_files_atexit(void); extern char *mhdocdir; diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index e2d97607..3967c634 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -302,7 +302,7 @@ static char delim3[] = /* from forw.c */ "\n----------------------------------------------------------------------\n\n"; static char delim4[] = "\n------------------------------\n\n"; -static FILE *(*mhl_action) () = (FILE *(*) ()) 0; +static FILE *(*mhl_action)(char *); /* * prototypes