[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-grep] patch to fix a rare problem with consts
From: |
Stepan Kasal |
Subject: |
[bug-grep] patch to fix a rare problem with consts |
Date: |
Wed, 9 Feb 2005 11:31:44 +0100 |
User-agent: |
Mutt/1.4.1i |
Hi,
Bruno Haible has mailed me the patch attached to this mail.
Here is his original explanation:
--- Bruno ---
When I build the grep CVS on MacOS X [it appears to depend on the gcc
version] with
$ CC=gcc CPPFLAGS=-Wall ./configure --disable-nls
$ make
I get a warning about 'const' being cast away from the return statements
in kwset.c:kwsincr(). The reason is that in this case
return _("memory exhausted");
expands to
return "memory exhausted";
The caller is obviously not meant to destructively modify the returned
error message. Therefore the right fix is to change the return type.
--- end ---
I wasn't able to reproduce the problem, but I think there is no problem
with this patch.
Stepan
- [bug-grep] patch to fix a rare problem with consts,
Stepan Kasal <=