summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-12-12 19:09:36 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2015-02-10 18:14:44 -0800
commitf358f0d50cadaf10f7d97e21da00419a4a37c4e1 (patch)
treef1017f8c426ccc2a833bfa4d384947f3a3026c8f
parent11af200b004b4810c9267e3e16449c3175c64d4a (diff)
dmx: fix printf format argument warnings
Gets rid of these gcc 4.8 warnings: dmxinit.c: In function ‘dmxErrorHandler’: dmxinit.c:167:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID64’ [-Wformat=] ev->resourceid); ^ dmxinit.c:171:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID64’ [-Wformat=] ev->resourceid); ^ dmxinit.c:175:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID64’ [-Wformat=] ev->resourceid); ^ dmxinit.c:181:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=] ev->serial); ^ dmxinit.c:183:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=] dpy->request); ^ dmxinit.c: In function ‘InitOutput’: dmxinit.c:637:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=] dmxLog(dmxInfo, "Generation: %d\n", dmxGeneration); ^ dmxprop.c: In function ‘dmxPropertyCheckOtherWindows’: dmxprop.c:223:24: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘Window’ [-Wformat=] dmxScreen->name, win, tp.value); ^ dmxprop.c: In function ‘dmxPropertyWindow’: dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘Window’ [-Wformat=] other->index, other->name, other->scrnWin); ^ dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘Window’ [-Wformat=] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/dmx/dmxinit.c12
-rw-r--r--hw/dmx/dmxprop.c6
2 files changed, 9 insertions, 9 deletions
diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
index fd2ade0ef..37961b812 100644
--- a/hw/dmx/dmxinit.c
+++ b/hw/dmx/dmxinit.c
@@ -164,23 +164,23 @@ dmxErrorHandler(Display * dpy, XErrorEvent * ev)
switch (ev->error_code) {
case BadValue:
dmxLog(dmxWarning, " Value: 0x%x\n",
- ev->resourceid);
+ (unsigned int) ev->resourceid);
break;
case BadAtom:
dmxLog(dmxWarning, " AtomID: 0x%x\n",
- ev->resourceid);
+ (unsigned int) ev->resourceid);
break;
default:
dmxLog(dmxWarning, " ResourceID: 0x%x\n",
- ev->resourceid);
+ (unsigned int) ev->resourceid);
break;
}
/* Provide serial number information */
dmxLog(dmxWarning, " Failed serial number: %d\n",
- ev->serial);
+ (unsigned int) ev->serial);
dmxLog(dmxWarning, " Current serial number: %d\n",
- dpy->request);
+ (unsigned int) dpy->request);
return 0;
}
@@ -634,7 +634,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
if (major > 0 && minor > 0)
year += 2000;
- dmxLog(dmxInfo, "Generation: %d\n", dmxGeneration);
+ dmxLog(dmxInfo, "Generation: %lu\n", dmxGeneration);
dmxLog(dmxInfo, "DMX version: %d.%d.%02d%02d%02d (%s)\n",
major, minor, year, month, day, VENDOR_STRING);
diff --git a/hw/dmx/dmxprop.c b/hw/dmx/dmxprop.c
index 4be2dbd4c..5e306d286 100644
--- a/hw/dmx/dmxprop.c
+++ b/hw/dmx/dmxprop.c
@@ -220,7 +220,7 @@ dmxPropertyCheckOtherWindows(DMXScreenInfo * dmxScreen, Atom atom)
if (XGetTextProperty(dpy, win, &tp, atom) && tp.nitems) {
dmxLog(dmxDebug, "On %s/%lu: %s\n",
- dmxScreen->name, win, tp.value);
+ dmxScreen->name, (unsigned long) win, tp.value);
if (!strncmp((char *) tp.value, (char *) id,
strlen((char *) id))) {
int idx;
@@ -360,8 +360,8 @@ dmxPropertyWindow(DMXScreenInfo * dmxScreen)
dmxScreen->next = (other->next ? other->next : other);
other->next = (tmp ? tmp : dmxScreen);
dmxLog(dmxDebug, "%d/%s/%lu and %d/%s/%lu are on the same backend\n",
- dmxScreen->index, dmxScreen->name, dmxScreen->scrnWin,
- other->index, other->name, other->scrnWin);
+ dmxScreen->index, dmxScreen->name, (unsigned long) dmxScreen->scrnWin,
+ other->index, other->name, (unsigned long) other->scrnWin);
}
snprintf(buf, sizeof(buf), ".%d,%lu", dmxScreen->index,