This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: some const char * trivia


On Tue, 03 Jun 2003 16:40:45 -0400, Andrew Cagney <ac131313@redhat.com> said:


I got slightly carried away with trying to eliminate some
-Wwrite-strings errors.  I'm trying to put the resultant mess on
cagney_writestrings-20030508-branch.


Are you going to post patches, or are they too all-consuming/mindless
to matter?  I wouldn't mind a brief description of changes you're
making.  (E.g. what members of data structures are you turning into
const char *'s?  All the name-like stuff?)

The doco in the cli. It's where it tried to free it that I got scared :-)


Anyways, looking at the patch to linespec.c, I was shocked to see that
the changes were that simple, but actually you've been misled by the
compiler.  Consider set_flags (from mainline, not from your branch):

I was using an iterative process:


	- compile with -Wwrite-strings
	- change one function signature to const char *
	- compile with -Wno-write-strings
	- fix up the parameter passing/assignment mess
	- repeat.

And gave up when things got really messy. So don't take the branch too seriously. I was carefully avoiding linespec.

Andrew




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]