mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-04 15:20:34 +01:00
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:
parent
2ddae8f0bd
commit
020d83d361
1 changed files with 2 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue