diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-09-09 20:05:27 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-09-09 20:05:27 -0700 |
commit | 9f0f4a2c5495eec2d81a4381fb962fad93b2ddde (patch) | |
tree | 7608fb1bc62b2df1c8bcb4f549a35607a37e905b /lisp/re | |
parent | 40615f52b8fe7478599ce4948ccc751aa0a34397 (diff) |
Copious const cleanup
Removes 1554 gcc warnings of "discards ‘const’ qualifier"
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'lisp/re')
-rw-r--r-- | lisp/re/re.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/re/re.c b/lisp/re/re.c index f4c1246..55ba17b 100644 --- a/lisp/re/re.c +++ b/lisp/re/re.c @@ -1665,7 +1665,7 @@ done: int reerror(int ecode, const re_cod *preg, char *ebuffer, int ebuffer_size) { - static char *errors[] = { + static const char *errors[] = { "No error", "Failed to match", /* NOMATCH */ @@ -1687,7 +1687,7 @@ reerror(int ecode, const re_cod *preg, char *ebuffer, int ebuffer_size) "Assertion error - you found a bug", /* ASSERT */ "Invalid argument" /* INVARG */ }; - char *str; + const char *str; if (ecode >= 0 && ecode < sizeof(errors) / sizeof(errors[0])) str = errors[ecode]; |