]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
make pedantic compiler options generate less warnings
authorDaniel Stenberg <daniel@haxx.se>
Thu, 29 Jan 2004 13:54:08 +0000 (13:54 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 29 Jan 2004 13:54:08 +0000 (13:54 +0000)
src/getpass.c
src/homedir.c
src/urlglob.c
src/writeout.c

index 975ce1dde7963571bd124ab72dd834f63092ccb3..4743f9a4f3addae2672bec67cd64841902708b66 100644 (file)
@@ -36,6 +36,8 @@
 
 #ifndef HAVE_GETPASS_R
 
+#include "getpass.h"
+
 #ifndef WIN32
 #ifdef VMS
 #include <stdio.h>
@@ -101,9 +103,9 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
   FILE *infp;
   char infp_fclose = 0;
   FILE *outfp;
-  RETSIGTYPE (*sigint)();
+  RETSIGTYPE (*sigint)(int);
 #ifdef SIGTSTP
-  RETSIGTYPE (*sigtstp)();
+  RETSIGTYPE (*sigtstp)(int);
 #endif
   size_t bytes_read;
   int infd;
index 003d9f1aa5d6695b4dc4576268e391f7b4a55eb2..fedbdb8fcc2f024edbc70b0231de36be471d7e30 100644 (file)
@@ -40,6 +40,8 @@
 #include <unixlib.h>
 #endif
 
+#include "homedir.h"
+
 #ifdef CURLDEBUG
 #include "../lib/memdebug.h"
 #endif
index e1be1834f267b5ebddce50d838e48518f7618896..7f0409bf01199061bd451d9ba583b2226f5f7eab 100644 (file)
@@ -136,8 +136,11 @@ static GlobCode glob_set(URLGlob *glob, char *pattern, int pos, int *amount)
       ++pos;
     }
   }
+  /* we never reach this point */
+#if 0
   snprintf(globerrormsg, sizeof(globerrormsg), "malformatted pattern");
   return GLOB_ERROR;
+#endif
 }
 
 static GlobCode glob_range(URLGlob *glob, char *pattern, int pos, int *amount)
index 447e3935cb0f781a47ffa35a253682dd11701eed..5d8d7428b214f3ea2071f39f8ea85fd792c06de0 100644 (file)
@@ -184,6 +184,7 @@ void ourWriteOut(CURL *curl, char *writeinfo)
                   fputs(stringp, stream);
                 break;
               default:
+                /* -Wunreachable-code wrongly complains on this */
                 break;
               }
               break;