]> git.ozlabs.org Git - ppp.git/commitdiff
pppdump: Fixed building with GCC 15 (#548)
authorJaroslav Škarvada <jskarvad@redhat.com>
Thu, 27 Feb 2025 22:00:16 +0000 (23:00 +0100)
committerGitHub <noreply@github.com>
Thu, 27 Feb 2025 22:00:16 +0000 (09:00 +1100)
GCC 15 defaults to C23 which does not allow K&R declarations.

Credit Yaakov Selkowitz in:
https://src.fedoraproject.org/rpms/ppp/pull-request/12

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
pppdump/pppdump.c

index c24208af5fff98edc3e5634cade285d02005f8ab..1534036ca7ee7ead4453e8a9c942934a5924350a 100644 (file)
@@ -42,14 +42,12 @@ int tot_sent, tot_rcvd;
 extern int optind;
 extern char *optarg;
 
-void dumplog();
-void dumpppp();
-void show_time();
+void dumplog(FILE *);
+void dumpppp(FILE *);
+void show_time(FILE *, int);
 
 int
-main(ac, av)
-    int ac;
-    char **av;
+main(int ac, char **av)
 {
     int i;
     char *p;
@@ -97,8 +95,7 @@ main(ac, av)
 }
 
 void
-dumplog(f)
-    FILE *f;
+dumplog(FILE *f)
 {
     int c, n, k, col;
     int nb, c2;
@@ -241,8 +238,7 @@ struct pkt {
 unsigned char dbuf[8192];
 
 void
-dumpppp(f)
-    FILE *f;
+dumpppp(FILE *f)
 {
     int c, n, k;
     int nb, nl, dn, proto, rv;
@@ -375,9 +371,7 @@ dumpppp(f)
 }
 
 void
-show_time(f, c)
-    FILE *f;
-    int c;
+show_time(FILE *f, int c)
 {
     time_t t;
     int n;