]> Savannah Git Hosting - gnulib.git/commitdiff
mbsstr, quotearg, xstrtol: pacify IRIX 6.5 cc
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 11 May 2014 07:36:37 +0000 (00:36 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 11 May 2014 07:36:59 +0000 (00:36 -0700)
These were found when building the latest grep snapshot on IRIX 6.5.
* lib/mbsstr.c (knuth_morris_pratt_multibyte): Break "a=b=c;" into
"b=c; a=b;", since IRIX 6.5 cc complains about the former if b is
never used later.
* lib/quotearg.c (quoting_options_from_style):
* lib/xstrtol.c (__xstrtol):
Use enum instead of 0, to pacify IRIX 6.5 cc.

ChangeLog
lib/mbsstr.c
lib/quotearg.c
lib/xstrtol.c

index 428563538f86e62491947114d635687a411864f3..a8b2ee08451c58cda1b8214060b7b47a2a32aa8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2014-05-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       mbsstr, quotearg, xstrtol: pacify IRIX 6.5 cc
+       These were found when building the latest grep snapshot on IRIX 6.5.
+       * lib/mbsstr.c (knuth_morris_pratt_multibyte): Break "a=b=c;" into
+       "b=c; a=b;", since IRIX 6.5 cc complains about the former if b is
+       never used later.
+       * lib/quotearg.c (quoting_options_from_style):
+       * lib/xstrtol.c (__xstrtol):
+       Use enum instead of 0, to pacify IRIX 6.5 cc.
+
 2014-04-18  Pádraig Brady  <P@draigBrady.com>
 
        gitlog-to-changelog: revert inclusion of git-log-fix file
index a3ac200507fffa013d14588bf638150afa4c8092..1ae9fe4229e0f9e273e79d20d4f53fc239126d1f 100644 (file)
@@ -50,7 +50,8 @@ knuth_morris_pratt_multibyte (const char *haystack, const char *needle,
   if (memory == NULL)
     return false;
   needle_mbchars = memory;
-  table = table_memory = needle_mbchars + m;
+  table_memory = needle_mbchars + m;
+  table = table_memory;
 
   /* Fill needle_mbchars.  */
   {
index 90134740ebe4355117c6c15b4426b19f92247ec2..bef7b98b8be8418835cb30ff4878a2ad39cdb3a9 100644 (file)
@@ -178,7 +178,7 @@ set_custom_quoting (struct quoting_options *o,
 static struct quoting_options /* NOT PURE!! */
 quoting_options_from_style (enum quoting_style style)
 {
-  struct quoting_options o = { 0, 0, { 0 }, NULL, NULL };
+  struct quoting_options o = { literal_quoting_style, 0, { 0 }, NULL, NULL };
   if (style == custom_quoting_style)
     abort ();
   o.style = style;
index 965cfcfa400518661e92a37a080833706a22b06d..f6d535a7f381f494dbbcb6f7725b0898b4b2cd71 100644 (file)
@@ -182,7 +182,7 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
           break;
 
         case 'c':
-          overflow = 0;
+          overflow = LONGINT_OK;
           break;
 
         case 'E': /* exa or exbi */