1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2025-11-21 05:21:47 +00:00

Update to pacify recent GCC's static checking.

These changes pacify gcc 4.8.2-19ubuntu1 on Ubuntu 14.04,
and take advantage of recently-added GCC options when compiling
with GCC_DEBUG_FLAGS.
* Makefile (GCC_DEBUG_FLAGS): Add -Wdeclaration-after-statement,
-Wjump-misses-init, -Wsuggest-attribute=format.
* date.c (copyright, sccsid):
* strftime.c (sccsid):
Remove unused vars.
* date.c (main):
* localtime.c (tzparse):
Remove no-longer-needed uses of INITIALIZE; GCC is smart enough to
figure these out on its own now.
* localtime.c (gmtsub): Redo initialization of gmt_is_set to pacify GCC.
Retry malloc next time even if it failed this time.
* private.h, zdump.c (GNUC_or_lint): Remove, as it provoked a GCC
diagnostic about unused macros in some cases.  Instead, just use
'lint'.  All uses removed.
(TZ_DOMAIN): Don't define unless needed, as otherwise it provokes
a GCC diagnostic about unused macros.
* private.h (INITIALIZE): Simplify accordingly.
* NEWS: Document this.
This commit is contained in:
Paul Eggert
2014-06-18 23:25:57 -07:00
parent 3001a6adf4
commit 99544d30aa
7 changed files with 20 additions and 59 deletions

14
date.c
View File

@ -15,16 +15,6 @@
* WARRANTIES OF MERCHANT[A]BILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef lint
char copyright[] =
"@(#) Copyright (c) 1985, 1987, 1988 The Regents of the University of California.\n\
All rights reserved.\n";
#endif /* not lint */
#ifndef lint
static char sccsid[] = "@(#)date.c 4.23 (Berkeley) 9/20/88";
#endif /* not lint */
#include "private.h"
#if HAVE_ADJTIME || HAVE_SETTIMEOFDAY
#include "sys/time.h" /* for struct timeval, struct timezone */
@ -99,10 +89,6 @@ main(const int argc, char *argv[])
char * endarg;
INITIALIZE(dousg);
INITIALIZE(minuteswest);
INITIALIZE(dsttime);
INITIALIZE(adjust);
INITIALIZE(t);
#ifdef LC_ALL
(void) setlocale(LC_ALL, "");
#endif /* defined(LC_ALL) */