]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Explicitely cast Conf_MaxPenaltyTime (time_t) to "long"
authorAlexander Barton <alex@barton.de>
Tue, 29 Dec 2020 20:45:09 +0000 (21:45 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 29 Dec 2020 20:45:09 +0000 (21:45 +0100)
This fixes the following compiler warning, for example on OpenBSD:

  conf.c: In function 'Conf_Test':
  conf.c:391: warning: format '%ld' expects type 'long int', but argument
                       2 has type 'time_t'

Thanks to Götz Hoffart for reporting this!

src/ngircd/conf.c

index 1c5ba624d5dd93e732b511d204dca4e8f6196244..140d0b9f63b9b22acb2fabb7a4065ba1ab74bae9 100644 (file)
@@ -388,7 +388,7 @@ Conf_Test( void )
        printf("  MaxConnectionsIP = %d\n", Conf_MaxConnectionsIP);
        printf("  MaxJoins = %d\n", Conf_MaxJoins > 0 ? Conf_MaxJoins : -1);
        printf("  MaxNickLength = %u\n", Conf_MaxNickLength - 1);
-       printf("  MaxPenaltyTime = %ld\n", Conf_MaxPenaltyTime);
+       printf("  MaxPenaltyTime = %ld\n", (long)Conf_MaxPenaltyTime);
        printf("  MaxListSize = %d\n", Conf_MaxListSize);
        printf("  PingTimeout = %d\n", Conf_PingTimeout);
        printf("  PongTimeout = %d\n", Conf_PongTimeout);