]> diplodocus.org Git - nmh/commitdiff
Specify function parameters in prototypes, mainly void.
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 15 May 2017 13:12:21 +0000 (14:12 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 15 May 2017 13:12:21 +0000 (14:12 +0100)
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.

sbr/check_charset.c
sbr/ctype-checked.c
sbr/icalendar.l
sbr/m_mktemp.c
sbr/oauth.c
sbr/signals.c
sbr/utils.c
uip/mhlsbr.c

index 88026666065f3845a187fa156d95f7888a3d83b1..545aab46c8312bf9e88ae2b7e83070aecba899e6 100644 (file)
@@ -17,7 +17,7 @@ char *norm_charmap(char *);
  * Get the current character set
  */
 char *
  * Get the current character set
  */
 char *
-get_charset ()
+get_charset(void)
 {
     return norm_charmap(nl_langinfo (CODESET));
 }
 {
     return norm_charmap(nl_langinfo (CODESET));
 }
index 65b1cf316c6baf8f3c3e7a0a88e1802ff572356f..4f2a15d345b9e558a622a417797ca2601c251326 100644 (file)
@@ -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. */
 
 /* 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
 
 #endif
index c1e2162b3640f8f9c6f1bb10faa81835c7e68192..11006e79cbb7d41f876c907a6c6f350b3e755f82 100644 (file)
@@ -13,7 +13,7 @@
 #include "sbr/icalparse.h"
 
 static char *unfold (char *, size_t *);
 #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
  * 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
 #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
index f4d5c3fa179f37d1d49e1ca3b5fb75c49182e36a..338302c0cb5bc21ea0c6e59d13481b35e4c18bae 100644 (file)
@@ -319,7 +319,7 @@ m_unlink(const char *pathname) {
  * Remove all registered temporary files.
  */
 void
  * Remove all registered temporary files.
  */
 void
-remove_registered_files_atexit() {
+remove_registered_files_atexit(void) {
     unregister_for_removal(1);
 }
 
     unregister_for_removal(1);
 }
 
index 741cacb0f26bd3f107ba3048c1848158157ffcb7..ccc2ad3c857b5ab7d3979dc3516a99143137613b 100755 (executable)
@@ -240,7 +240,7 @@ set_err_http(mh_oauth_ctx *ctx, const struct curl_ctx *curl_ctx)
 }
 
 static char *
 }
 
 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);
 {
     const char *curl = curl_version_info(CURLVERSION_NOW)->version;
     return concat(user_agent, " libcurl/", curl, NULL);
index 39a01b32325535af9991f66232ca68caf1d9b264..97ac780c7d80551e1f052af3d797ef8322ed366e 100644 (file)
@@ -84,7 +84,7 @@ SIGNAL2 (int sig, SIGNAL_HANDLER func)
  * For use by nmh_init().
  */
 int
  * 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
     /*
      * Catch HUP, INT, QUIT, and TERM so that we can clean up tmp
      * files when the user terminates the process early.  And also a
index ef7df4aaad6984fc8f300d6c2d92fa2e2f8c4475..08ad0c1ad37796121f06c423e6166c4d5d6cd54c 100644 (file)
 #include <fcntl.h>
 
 /* sbr/signals.c */
 #include <fcntl.h>
 
 /* sbr/signals.c */
-extern int setup_signal_handlers();
+extern int setup_signal_handlers(void);
 
 /* sbr/m_mktemp.c */
 
 /* sbr/m_mktemp.c */
-extern void remove_registered_files_atexit();
+extern void remove_registered_files_atexit(void);
 
 extern char *mhdocdir;
 
 
 extern char *mhdocdir;
 
index e2d97607124b173a92d0380ba12046d76e8e55d5..3967c634f733400f1541c79f679a10c0f7e6bbbd 100644 (file)
@@ -302,7 +302,7 @@ static char delim3[] =              /* from forw.c */
     "\n----------------------------------------------------------------------\n\n";
 static char delim4[] = "\n------------------------------\n\n";
 
     "\n----------------------------------------------------------------------\n\n";
 static char delim4[] = "\n------------------------------\n\n";
 
-static FILE *(*mhl_action) () = (FILE *(*) ()) 0;
+static FILE *(*mhl_action)(char *);
 
 /*
  * prototypes
 
 /*
  * prototypes