X11: Fixed compiler warnings in DEBUG_XEVENTS sections.

This commit is contained in:
Ryan C. Gordon 2015-06-04 10:59:02 -04:00
parent 7738bd9b55
commit 96aef8cbca

View File

@ -918,8 +918,8 @@ X11_DispatchEvent(_THIS)
xdnd_version = (xevent.xclient.data.l[1] >> 24); xdnd_version = (xevent.xclient.data.l[1] >> 24);
#ifdef DEBUG_XEVENTS #ifdef DEBUG_XEVENTS
printf("XID of source window : %ld\n", data->xdnd_source); printf("XID of source window : %ld\n", data->xdnd_source);
printf("Protocol version to use : %ld\n", xdnd_version); printf("Protocol version to use : %d\n", xdnd_version);
printf("More then 3 data types : %ld\n", use_list); printf("More then 3 data types : %d\n", (int) use_list);
#endif #endif
if (use_list) { if (use_list) {
@ -1066,7 +1066,7 @@ X11_DispatchEvent(_THIS)
unsigned char *propdata; unsigned char *propdata;
int status, real_format; int status, real_format;
Atom real_type; Atom real_type;
unsigned long items_read, items_left, i; unsigned long items_read, items_left;
char *name = X11_XGetAtomName(display, xevent.xproperty.atom); char *name = X11_XGetAtomName(display, xevent.xproperty.atom);
if (name) { if (name) {
@ -1118,18 +1118,18 @@ X11_DispatchEvent(_THIS)
printf("{"); printf("{");
for (i = 0; i < items_read; i++) { for (i = 0; i < items_read; i++) {
char *name = X11_XGetAtomName(display, atoms[i]); char *atomname = X11_XGetAtomName(display, atoms[i]);
if (name) { if (atomname) {
printf(" %s", name); printf(" %s", atomname);
X11_XFree(name); X11_XFree(atomname);
} }
} }
printf(" }\n"); printf(" }\n");
} else { } else {
char *name = X11_XGetAtomName(display, real_type); char *atomname = X11_XGetAtomName(display, real_type);
printf("Unknown type: %ld (%s)\n", real_type, name ? name : "UNKNOWN"); printf("Unknown type: %ld (%s)\n", real_type, atomname ? atomname : "UNKNOWN");
if (name) { if (atomname) {
X11_XFree(name); X11_XFree(atomname);
} }
} }
} }