After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 81892 - Missings consts
Missings consts
Status: RESOLVED FIXED
Product: ORBit2
Classification: Deprecated
Component: IDL compiler
unspecified
Other All
: Normal normal
: ---
Assigned To: ORBit maintainers
ORBit maintainers
Depends on:
Blocks:
 
 
Reported: 2002-05-15 18:27 UTC by Morten Welinder
Modified: 2006-12-20 22:13 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Add a few (char *) casts (5.03 KB, text/plain)
2006-11-23 13:35 UTC, Jody Goldberg
Details

Description Morten Welinder 2002-05-15 18:27:48 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
...
Comment 1 Michael Meeks 2002-05-16 16:44:47 UTC
AFAIR there is a typedef / CORBA spec. related issue that means we
can't do this right - I forget what it is.
Comment 2 Morten Welinder 2003-04-14 15:07:35 UTC
Ping?

To at least produce proper C code, you then may have to cast every
string constant used in non-const settings.
Comment 3 Kjartan Maraas 2006-10-22 15:35:49 UTC
Has this changed since the last comment here?
Comment 4 Michael Meeks 2006-10-23 09:19:34 UTC
nah - this is the same bug ;-) but I suspect gnumeric's CORBA usage days are numbered anyway so ... :-)
Comment 5 Kjartan Maraas 2006-11-10 13:42:07 UTC
I commited a patch to add some missing consts today so maybe we could retry this and see if that was related?
Comment 6 Jody Goldberg 2006-11-23 13:35:27 UTC
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.
Comment 7 Kjartan Maraas 2006-12-17 19:20:34 UTC
Michael, does this look ok to commit?
Comment 8 Michael Meeks 2006-12-18 10:02:09 UTC
Didn't read it, but I'm certain Jody knows what he's doing, lets just go for it :-)
Comment 9 Kjartan Maraas 2006-12-20 22:13:14 UTC
Commited.