build: avoid warnings from -Wstrict-prototypes
authorJim Meyering <meyering@redhat.com>
Fri, 20 Nov 2009 17:19:18 +0000 (18:19 +0100)
committerJim Meyering <meyering@redhat.com>
Fri, 20 Nov 2009 17:19:32 +0000 (18:19 +0100)
* gzip.c (main): Declare using a prototype.
(progerror): Likewise.  And make parameter const.

gzip.c

diff --git a/gzip.c b/gzip.c
index ec3c585f04101026d3b60542a1cd99bed6a2f707..c1280d23247c7c844faa2b65abb17eb59f26813a 100644 (file)
--- a/gzip.c
+++ b/gzip.c
@@ -391,8 +391,7 @@ local void version()
     printf ("Written by Jean-loup Gailly.\n");
 }
 
-local void progerror (string)
-    char *string;
+local void progerror (char const *string)
 {
     int e = errno;
     fprintf (stderr, "%s: ", program_name);
@@ -402,9 +401,7 @@ local void progerror (string)
 }
 
 /* ======================================================================== */
-int main (argc, argv)
-    int argc;
-    char **argv;
+int main (int argc, char **argv)
 {
     int file_count;     /* number of files to process */
     size_t proglen;     /* length of program_name */