1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2025-11-21 23:57:30 +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

View File

@ -352,25 +352,11 @@ static time_t const time_t_max =
** INITIALIZE(x)
*/
#ifndef GNUC_or_lint
#ifdef lint
#define GNUC_or_lint
#endif /* defined lint */
#ifndef lint
#ifdef __GNUC__
#define GNUC_or_lint
#endif /* defined __GNUC__ */
#endif /* !defined lint */
#endif /* !defined GNUC_or_lint */
#ifndef INITIALIZE
#ifdef GNUC_or_lint
#define INITIALIZE(x) ((x) = 0)
#endif /* defined GNUC_or_lint */
#ifndef GNUC_or_lint
#define INITIALIZE(x)
#endif /* !defined GNUC_or_lint */
#endif /* !defined INITIALIZE */
# define INITIALIZE(x) ((x) = 0)
#else
# define INITIALIZE(x)
#endif
/*
** For the benefit of GNU folk...
@ -386,9 +372,9 @@ static time_t const time_t_max =
#endif /* !HAVE_GETTEXT */
#endif /* !defined _ */
#ifndef TZ_DOMAIN
#define TZ_DOMAIN "tz"
#endif /* !defined TZ_DOMAIN */
#if !defined TZ_DOMAIN && defined TZ_DOMAINDIR
# define TZ_DOMAIN "tz"
#endif
#if HAVE_INCOMPATIBLE_CTIME_R
#undef asctime_r