diff options
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | builtin.c | 11 | ||||
-rw-r--r-- | extension/ChangeLog | 4 | ||||
-rw-r--r-- | extension/intdiv.c | 5 | ||||
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | pc/config.h | 6 | ||||
-rw-r--r-- | support/ChangeLog | 5 | ||||
-rw-r--r-- | support/getopt.c | 1 |
8 files changed, 40 insertions, 10 deletions
@@ -1,3 +1,19 @@ +2017-12-24 Arnold D. Robbins <arnold@skeeve.com> + + Avoid some compiler warnings. Thanks to Michal Jaegermann + <michal.jnn@gmail.com> for the report. + + * builtin.c (do_strftime): Initialize save. + (do_dcgetttext): Initialize save and save2. + (do_dcngettext): Ditto. + (do_bindtextdomain): Initialize save and save1. + + Unrelated: + + * main.c (optlist): Make 'L' option's argument optional, to + match --lint. Thanks to Manuel Collado <mcollado2011@gmail.com> + for the report. + 2017-12-22 Arnold D. Robbins <arnold@skeeve.com> * config.guess, config.sub, depcomp, install-sh: Updated @@ -1914,7 +1914,7 @@ do_strftime(int nargs) bool do_gmt; NODE *val = NULL; NODE *sub = NULL; - char save; + char save = '\0'; // initialize to avoid compiler warnings static const time_t time_t_min = TYPE_MINIMUM(time_t); static const time_t time_t_max = TYPE_MAXIMUM(time_t); @@ -3790,7 +3790,7 @@ do_dcgettext(int nargs) #if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT int lc_cat; char *domain; - char save1, save2; + char save1 = '\0', save2 = '\0'; if (nargs == 3) { /* third argument */ tmp = POP_STRING(); @@ -3850,7 +3850,7 @@ do_dcngettext(int nargs) #if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT int lc_cat; char *domain; - char save, save1, save2; + char save = '\0', save1 = '\0', save2 = '\0'; bool saved_end = false; if (nargs == 5) { /* fifth argument */ @@ -3906,8 +3906,7 @@ do_dcngettext(int nargs) if (number == 1) { the_result = string1; reslen = t1->stlen; - } - else { + } else { the_result = string2; reslen = t2->stlen; } @@ -3939,7 +3938,7 @@ do_bindtextdomain(int nargs) /* set defaults */ directory = NULL; domain = TEXTDOMAIN; - char save, save1; + char save = '\0', save1 = '\0'; if (nargs == 2) { /* second argument */ t2 = POP_STRING(); diff --git a/extension/ChangeLog b/extension/ChangeLog index f7884019..b6e943cd 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,7 @@ +2017-12-24 Michal Jaegermann <michal.jnn@gmail.com> + + * intdiv.c: Fix compilation for MPFR 2.4.1. + 2017-12-20 Arnold D. Robbins <arnold@skeeve.com> * configure.ac: Add support for the --enable-versioned-dir option diff --git a/extension/intdiv.c b/extension/intdiv.c index 11045858..fb98f153 100644 --- a/extension/intdiv.c +++ b/extension/intdiv.c @@ -15,7 +15,12 @@ #include "gawkapi.h" #ifdef HAVE_MPFR +#include <gmp.h> #include <mpfr.h> +#ifndef MPFR_RNDZ +/* for compatibility with MPFR 2.X */ +#define MPFR_RNDZ GMP_RNDZ +#endif #endif #include "gettext.h" @@ -1443,7 +1443,7 @@ parse_args(int argc, char **argv) /* * The + on the front tells GNU getopt not to rearrange argv. */ - const char *optlist = "+F:f:v:W;bcCd::D::e:E:ghi:l:L:nNo::Op::MPrSstVYZ:"; + const char *optlist = "+F:f:v:W;bcCd::D::e:E:ghi:l:L::nNo::Op::MPrSstVYZ:"; int old_optind; int c; char *scan; diff --git a/pc/config.h b/pc/config.h index 8653601a..17c2c18a 100644 --- a/pc/config.h +++ b/pc/config.h @@ -462,7 +462,7 @@ #define PACKAGE_NAME "GNU Awk" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU Awk 4.2.0a" +#define PACKAGE_STRING "GNU Awk 4.2.60" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gawk" @@ -471,7 +471,7 @@ #define PACKAGE_URL "http://www.gnu.org/software/gawk/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "4.2.0a" +#define PACKAGE_VERSION "4.2.60" /* Define to 1 if *printf supports %F format */ #ifdef __DJGPP__ @@ -528,7 +528,7 @@ /* Version number of package */ -#define VERSION "4.2.0a" +#define VERSION "4.2.60" /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE diff --git a/support/ChangeLog b/support/ChangeLog index 848afde8..58669a5c 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,8 @@ +2017-12-24 Arnold D. Robbins <arnold@skeeve.com> + + * getopt.c: Include <stdlib.h> to get declarations of + malloc and free. + 2017-12-20 Arnold D. Robbins <arnold@skeeve.com> * regex.h: Restore GLIBC's use of '__' in parameter names. They diff --git a/support/getopt.c b/support/getopt.c index 8bc59610..64293754 100644 --- a/support/getopt.c +++ b/support/getopt.c @@ -30,6 +30,7 @@ #endif #include <stdio.h> +#include <stdlib.h> /* For malloc and free */ /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C |