xres.c: Preserve constness of string returned by LookupResourceName

MakeAtom now accepts a const char * so we don't need to cast down to
char * anymore.   Fixes gcc warning of:

xres.c: In function 'ProcXResQueryClientResources':
xres.c:155:6: warning: cast discards qualifiers from pointer target type

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Alan Coopersmith 2011-12-12 16:49:33 -08:00
parent 2ddae8f0bd
commit 020d83d361

View File

@ -147,12 +147,12 @@ ProcXResQueryClientResources (ClientPtr client)
if(num_types) {
xXResType scratch;
char *name;
const char *name;
for(i = 0; i < lastResourceType; i++) {
if(!counts[i]) continue;
name = (char *)LookupResourceName(i + 1);
name = LookupResourceName(i + 1);
if (strcmp(name, XREGISTRY_UNKNOWN))
scratch.resource_type = MakeAtom(name, strlen(name), TRUE);
else {