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.

Signed-off-by: Jon TURNEY <jon.tur...@dronecode.org.uk>
---
 randr/rrmonitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/randr/rrmonitor.c b/randr/rrmonitor.c
index 05285dd..c37dcf8 100644
--- a/randr/rrmonitor.c
+++ b/randr/rrmonitor.c
@@ -32,7 +32,7 @@ RRMonitorCrtcName(RRCrtcPtr crtc)
         RROutputPtr     output = crtc->outputs[0];
         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);
 }
 
-- 
2.4.5

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to