]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
getdate: fix various warnings which will be errors with clang-16
authorHolger Hoffstätte <holger@applied-asynchrony.com>
Wed, 9 Nov 2022 08:17:14 +0000 (09:17 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 9 Nov 2022 08:17:14 +0000 (09:17 +0100)
These were found by Gentoo's QA while rebuilding the world with
clang-16: https://bugs.gentoo.org/880519

Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
getdate.y

index f87875c682e600cf8d4464b065135d19d30c7f4a..47d368d30a984591f9d6dff3ef33073898e47eb2 100644 (file)
--- a/getdate.y
+++ b/getdate.y
@@ -448,9 +448,9 @@ o_merid     : /* NULL */
    the same signature as the function definition does. */
 #include "getdate.h"
 
-extern struct tm       *gmtime ();
-extern struct tm       *localtime ();
-extern time_t          mktime ();
+extern struct tm       *gmtime (const time_t *timep);
+extern struct tm       *localtime (const time_t *timep);
+extern time_t          mktime (struct tm *tm);
 
 /* Month and day table. */
 static TABLE const MonthDayTable[] = {
@@ -641,16 +641,13 @@ static TABLE const MilitaryTable[] = {
 
 /* ARGSUSED */
 static int
-yyerror (s)
-     char *s ATTRIBUTE_UNUSED;
+yyerror (char *s ATTRIBUTE_UNUSED)
 {
   return 0;
 }
 
 static int
-ToHour (Hours, Meridian)
-     int Hours;
-     MERIDIAN Meridian;
+ToHour (int Hours, MERIDIAN Meridian)
 {
   switch (Meridian)
     {
@@ -677,8 +674,7 @@ ToHour (Hours, Meridian)
 }
 
 static int
-ToYear (Year)
-     int Year;
+ToYear (int Year)
 {
   if (Year < 0)
     Year = -Year;
@@ -694,8 +690,7 @@ ToYear (Year)
 }
 
 static int
-LookupWord (buff)
-     char *buff;
+LookupWord (char *buff)
 {
   register char *p;
   register char *q;