delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2013/02/16/09:59:50

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
X-Authenticated: #27081556
X-Provags-ID: V01U2FsdGVkX18KwFIewWIKrFSAklNutMl7rv+yEM4kaNmha/8bFm
ZQN+P1s8Imnje9
Message-ID: <511F9E9B.7090309@gmx.de>
Date: Sat, 16 Feb 2013 15:58:35 +0100
From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Fixing the warning: function declaration isn't a prototype [-Wstrict-prototypes]
X-Y-GMX-Trusted: 0
Reply-To: djgpp-workers AT delorie DOT com

OFYI, I have commited the small patch below that fixes the warning:
   function declaration isn't a prototype [-Wstrict-prototypes]
in zoneinfo/src/date.c.

Regards,
Juan M. Guerrero




Index: djgpp/zoneinfo/src/date.c
===================================================================
RCS file: /cvs/djgpp/djgpp/zoneinfo/src/date.c,v
retrieving revision 1.4
diff -U 5 -r1.4 date.c
--- djgpp/zoneinfo/src/date.c    31 Jan 2013 22:37:11 -0000    1.4
+++ djgpp/zoneinfo/src/date.c    16 Feb 2013 14:51:49 -0000
@@ -54,18 +54,18 @@

  #ifndef SECSPERMIN
  #define SECSPERMIN    60
  #endif /* !defined SECSPERMIN */

-extern double        atof();
+extern double        atof(const char *s);
  extern char **        environ;
-extern char *        getlogin();
-extern time_t        mktime();
+extern char *        getlogin(void);
+extern time_t        mktime(struct tm *tptr);
  extern char *        optarg;
  extern int        optind;
-extern char *        strchr();
-extern time_t        time();
+extern char *        strchr(const char *s, int c);
+extern time_t        time(time_t *t);
  extern char *        tzname[2];

  static int        retval = EXIT_SUCCESS;

  static void        checkfinal(const char *, int, time_t, time_t);
@@ -445,11 +445,11 @@
  #include "netdb.h"
  #define TSPTYPES
  #include "protocols/timed.h"
  #endif /* TSP_SETDATE */

-extern int        logwtmp();
+extern int        logwtmp(char *line, char *name, char *host);

  #if HAVE_SETTIMEOFDAY == 1
  #define settimeofday(t, tz) (settimeofday)(t)
  #endif /* HAVE_SETTIMEOFDAY == 1 */

@@ -561,11 +561,11 @@
          errensure();
      }
      exit(retval);
  }

-extern size_t    strftime();
+extern size_t    strftime(char *s, size_t maxsize, const char *format, 
const struct tm *t);

  #define INCR    1024

  static void
  timeout(FILE *const fp, const char *const format, const struct tm 
*const tmp)
Index: djgpp/zoneinfo/src/djdiffs
===================================================================
RCS file: /cvs/djgpp/djgpp/zoneinfo/src/djdiffs,v
retrieving revision 1.2
diff -U 5 -r1.2 djdiffs
--- djgpp/zoneinfo/src/djdiffs    31 Jan 2013 22:38:51 -0000    1.2
+++ djgpp/zoneinfo/src/djdiffs    16 Feb 2013 14:51:50 -0000
@@ -1,5 +1,11 @@
+2013-02-15  Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
+
+    * djgpp/zoneinfo/src/date.c:  Fix warning: function declaration isn't
+    a prototype [-Wstrict-prototypes].
+
+
  2012-11-24  Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>

      * djgpp/distrib/p/djtzn204/djtzn204.dsm:  Update author-email and
      author-ftp-site.

@@ -1326,5 +1332,58 @@
       }
       free(name);
       return 0;
   }

+diff -aprNU5 djgpp.orig/zoneinfo/src/date.c djgpp/zoneinfo/src/date.c
+--- djgpp.orig/zoneinfo/src/date.c    2013-01-31 22:37:10 +0000
++++ djgpp/zoneinfo/src/date.c    2013-02-16 02:55:10 +0000
+@@ -54,18 +54,18 @@ static char sccsid[] = "@(#)date.c    4.23
+
+ #ifndef SECSPERMIN
+ #define SECSPERMIN    60
+ #endif /* !defined SECSPERMIN */
+
+-extern double        atof();
++extern double        atof(const char *s);
+ extern char **        environ;
+-extern char *        getlogin();
+-extern time_t        mktime();
++extern char *        getlogin(void);
++extern time_t        mktime(struct tm *tptr);
+ extern char *        optarg;
+ extern int        optind;
+-extern char *        strchr();
+-extern time_t        time();
++extern char *        strchr(const char *s, int c);
++extern time_t        time(time_t *t);
+ extern char *        tzname[2];
+
+ static int        retval = EXIT_SUCCESS;
+
+ static void        checkfinal(const char *, int, time_t, time_t);
+@@ -445,11 +445,11 @@ reset(const time_t newt, const int nflag
+ #include "netdb.h"
+ #define TSPTYPES
+ #include "protocols/timed.h"
+ #endif /* TSP_SETDATE */
+
+-extern int        logwtmp();
++extern int        logwtmp(char *line, char *name, char *host);
+
+ #if HAVE_SETTIMEOFDAY == 1
+ #define settimeofday(t, tz) (settimeofday)(t)
+ #endif /* HAVE_SETTIMEOFDAY == 1 */
+
+@@ -561,11 +561,11 @@ display(const char *const format)
+         errensure();
+     }
+     exit(retval);
+ }
+
+-extern size_t    strftime();
++extern size_t    strftime(char *s, size_t maxsize, const char *format, 
const struct tm *t);
+
+ #define INCR    1024
+
+ static void
+ timeout(FILE *const fp, const char *const format, const struct tm 
*const tmp)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019