debug output format fix in RRMonitorCrtcName()

xorg/xserver/randr/rrmonitor.c:35:5: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘RRCrtc’ [-Werror=format=]

RRCrtc is XID is CARD32, which inside the server is unsigned long or int
depending on architecture, so a cast is required.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
Jon TURNEY 2015-08-13 13:11:31 +01:00 committed by Adam Jackson
parent fe25329603
commit 9ee05c8987

View File

@ -32,7 +32,7 @@ RRMonitorCrtcName(RRCrtcPtr crtc)
RROutputPtr output = crtc->outputs[0]; RROutputPtr output = crtc->outputs[0];
return MakeAtom(output->name, output->nameLength, TRUE); return MakeAtom(output->name, output->nameLength, TRUE);
} }
sprintf(name, "Monitor-%08x", crtc->id); sprintf(name, "Monitor-%08lx", (unsigned long int)crtc->id);
return MakeAtom(name, strlen(name), TRUE); return MakeAtom(name, strlen(name), TRUE);
} }