Constify atom name strings
Changes MakeAtom to take a const char * and NameForAtom to return them, since many callers pass pointers to constant strings stored in read-only ELF sections. Updates in-tree callers as necessary to clear const mismatch warnings introduced by this change. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -457,7 +457,7 @@ ProcXFixesGetCursorName (ClientPtr client)
|
||||
CursorPtr pCursor;
|
||||
xXFixesGetCursorNameReply reply;
|
||||
REQUEST(xXFixesGetCursorNameReq);
|
||||
char *str;
|
||||
const char *str;
|
||||
int len;
|
||||
|
||||
REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq);
|
||||
@@ -507,7 +507,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client)
|
||||
CursorPtr pCursor;
|
||||
CARD32 *image;
|
||||
int npixels;
|
||||
char *name;
|
||||
const char *name;
|
||||
int nbytes, nbytesRound;
|
||||
int width, height;
|
||||
int rc, x, y;
|
||||
|
||||
Reference in New Issue
Block a user