the typedef in X11/Intrinsic.h for Arg does not qualify the name field with const
Submitted by Andrew J. Schorr
Assigned to Jeremy Huddleston Sequoia
Description
In X11/Intrinsic.h, we have this:
typedef char *String;
typedef struct { String name; XtArgVal value; } Arg, *ArgList;
As a result, when the XtSetArg macro is used to populate one of these structures, it is often the case that a constant string (e.g. 'const char *') is assigned to the name field. Since name does not have the const qualifier, a compiler warning is issued.
Is there any reason not to use 'const char *' for the name field? I cannot see why any code would have a reason to modify the name string...