[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] mbsstr, quotearg, xstrtol: pacify IRIX 6.5 cc
From: |
Paul Eggert |
Subject: |
[PATCH] mbsstr, quotearg, xstrtol: pacify IRIX 6.5 cc |
Date: |
Sun, 11 May 2014 00:36:37 -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 | 11 +++++++++++
lib/mbsstr.c | 3 ++-
lib/quotearg.c | 2 +-
lib/xstrtol.c | 2 +-
4 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4285635..a8b2ee0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2014-05-11 Paul Eggert <address@hidden>
+
+ 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 <address@hidden>
gitlog-to-changelog: revert inclusion of git-log-fix file
diff --git a/lib/mbsstr.c b/lib/mbsstr.c
index a3ac200..1ae9fe4 100644
--- a/lib/mbsstr.c
+++ b/lib/mbsstr.c
@@ -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. */
{
diff --git a/lib/quotearg.c b/lib/quotearg.c
index 9013474..bef7b98 100644
--- a/lib/quotearg.c
+++ b/lib/quotearg.c
@@ -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;
diff --git a/lib/xstrtol.c b/lib/xstrtol.c
index 965cfcf..f6d535a 100644
--- a/lib/xstrtol.c
+++ b/lib/xstrtol.c
@@ -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 */
--
1.9.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] mbsstr, quotearg, xstrtol: pacify IRIX 6.5 cc,
Paul Eggert <=