Bug 4875 - the typedef in X11/Intrinsic.h for Arg does not qualify the name field with const
Summary: the typedef in X11/Intrinsic.h for Arg does not qualify the name field with c...
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xt (show other bugs)
Version: unspecified
Hardware: All All
: high minor
Assignee: Jeremy Huddleston Sequoia
QA Contact: Xorg Project Team
URL:
Whiteboard: 2011BRB_Reviewed
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-25 07:17 UTC by Andrew J. Schorr
Modified: 2018-08-10 20:01 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew J. Schorr 2005-10-25 07:17:07 UTC
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...
Comment 1 Daniel Stone 2007-02-27 01:28:32 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 GitLab Migration User 2018-08-10 20:01:41 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libxt/issues/2.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.