bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-grep] patch to fix a rare problem with consts, second attempt


From: Stepan Kasal
Subject: [bug-grep] patch to fix a rare problem with consts, second attempt
Date: Wed, 9 Feb 2005 12:01:42 +0100
User-agent: Mutt/1.4.1i

[I have to apologize, I've forgotten to attach the patch.]

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

Attachment: grep-const.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]