[tz] [PATCH 1/4] * date.c: Pacify GCC 4.7.3.

Paul Eggert eggert at cs.ucla.edu
Fri Aug 9 09:07:51 UTC 2013


(atof, getlogin, mktime, strchr, time, strftime):
Remove old-style declarations.  GCC 4.7.3 warns about them,
and they aren't needed nowadays anyway.
(main) [HAVE_SETTIMEOFDAY != 2]: "Use" dsttime and minuteswest
to pacify GCC 4.7.3.
---
 date.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/date.c b/date.c
index 047969f..bae90f3 100644
--- a/date.c
+++ b/date.c
@@ -54,14 +54,9 @@ static char sccsid[] = "@(#)date.c	4.23 (Berkeley) 9/20/88";
 #define SECSPERMIN	60
 #endif /* !defined SECSPERMIN */
 
-extern double		atof();
 extern char **		environ;
-extern char *		getlogin();
-extern time_t		mktime();
 extern char *		optarg;
 extern int		optind;
-extern char *		strchr();
-extern time_t		time();
 extern char *		tzname[2];
 
 static int		retval = EXIT_SUCCESS;
@@ -270,6 +265,8 @@ _("date: error: multiple values in command line\n"));
 			oops("settimeofday");
 #endif /* HAVE_SETTIMEOFDAY == 2 */
 #if HAVE_SETTIMEOFDAY != 2
+		(void) dsttime;
+		(void) minuteswest;
 		(void) fprintf(stderr,
 _("date: warning: kernel doesn't keep -d/-t information, option ignored\n"));
 #endif /* HAVE_SETTIMEOFDAY != 2 */
@@ -543,8 +540,6 @@ display(const char *const format)
 	exit(retval);
 }
 
-extern size_t	strftime();
-
 #define INCR	1024
 
 static void
-- 
1.8.1.2




More information about the tz mailing list