string constants in X11/StringDefs.h discard const qualifier
Submitted by Andrew J. Schorr
Assigned to Xorg Project Team
In <X11/StringDefs.h>, we have the following:
#define _XtStringDefs_h_Const const
extern _XtStringDefs_h_Const char XtStrings;
#define XtNaccelerators ((char*)&XtStrings) ...
So the cast in the define is discarding the const qualifier, and gcc complains whenever one of these defines is used:
warning: cast discards qualifiers from pointer target type
Why is the cast there at all? Why not simply have:
#define XtNaccelerators (&XtStrings)
I guess this would be a simple patch to the makestrs program. The current behavior seems to be hard-wired into the IntelABIWriteHeader() and DefaultWriteHeader() functions...