GNOME Bugzilla – Bug 81892
Missings consts
Last modified: 2006-12-20 22:13:14 UTC
When compiling gnumeric (which uses -Wwrite-strings) I get lots of warnings. It looks like something in orbit lacks some "const"s to handle "const char *" string constant. GNOME_Gnumeric_Graph-common.c:53: warning: initialization discards qualifiers from pointer target type GNOME_Gnumeric_Graph-common.c:54: warning: initialization discards qualifiers from pointer target type GNOME_Gnumeric_Graph-common.c:100: warning: initialization discards qualifiers from pointer target type GNOME_Gnumeric_Graph-common.c:101: warning: initialization discards qualifiers from pointer target type GNOME_Gnumeric_Graph-common.c:147: warning: initialization discards qualifiers from pointer target type GNOME_Gnumeric_Graph-common.c:148: warning: initialization discards qualifiers from pointer target type GNOME_Gnumeric_Graph-common.c:194: warning: initialization discards qualifiers from pointer target type GNOME_Gnumeric_Graph-common.c:195: warning: initialization discards qualifiers from pointer target type GNOME_Gnumeric_Graph-common.c:337: warning: initialization discards qualifiers from pointer target type GNOME_Gnumeric_Graph-common.c:338: warning: initialization discards qualifiers from pointer target type ...
AFAIR there is a typedef / CORBA spec. related issue that means we can't do this right - I forget what it is.
Ping? To at least produce proper C code, you then may have to cast every string constant used in non-const settings.
Has this changed since the last comment here?
nah - this is the same bug ;-) but I suspect gnumeric's CORBA usage days are numbered anyway so ... :-)
I commited a patch to add some missing consts today so maybe we could retry this and see if that was related?
Created attachment 77057 [details] Add a few (char *) casts and a missing new line in the generated output. I didn't audit all of the code generators call to \"%s\" but this seems to cover all of the obvious bits.
Michael, does this look ok to commit?
Didn't read it, but I'm certain Jody knows what he's doing, lets just go for it :-)
Commited.