aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/dmx/dmxinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/dmx/dmxinit.c')
-rw-r--r--xorg-server/hw/dmx/dmxinit.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/xorg-server/hw/dmx/dmxinit.c b/xorg-server/hw/dmx/dmxinit.c
index fd2ade0ef..025dc8637 100644
--- a/xorg-server/hw/dmx/dmxinit.c
+++ b/xorg-server/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);
@@ -762,7 +762,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
dmxGlxVisualPrivate **configprivs = NULL;
int nconfigs = 0;
int (*oldErrorHandler) (Display *, XErrorEvent *);
- int i;
/* Catch errors if when using an older GLX w/o FBconfigs */
oldErrorHandler = XSetErrorHandler(dmxNOPErrorHandler);
@@ -797,28 +796,29 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
configprivs = malloc(nconfigs * sizeof(dmxGlxVisualPrivate *));
if (configs != NULL && configprivs != NULL) {
+ int j;
/* Initialize our private info for each visual
* (currently only x_visual_depth and x_visual_class)
*/
- for (i = 0; i < nconfigs; i++) {
+ for (j = 0; j < nconfigs; j++) {
- configprivs[i] = (dmxGlxVisualPrivate *)
+ configprivs[j] = (dmxGlxVisualPrivate *)
malloc(sizeof(dmxGlxVisualPrivate));
- configprivs[i]->x_visual_depth = 0;
- configprivs[i]->x_visual_class = 0;
+ configprivs[j]->x_visual_depth = 0;
+ configprivs[j]->x_visual_class = 0;
/* Find the visual depth */
- if (configs[i].vid > 0) {
- int j;
-
- for (j = 0; j < dmxScreen->beNumVisuals; j++) {
- if (dmxScreen->beVisuals[j].visualid ==
- configs[i].vid) {
- configprivs[i]->x_visual_depth =
- dmxScreen->beVisuals[j].depth;
- configprivs[i]->x_visual_class =
- dmxScreen->beVisuals[j].class;
+ if (configs[j].vid > 0) {
+ int k;
+
+ for (k = 0; k < dmxScreen->beNumVisuals; k++) {
+ if (dmxScreen->beVisuals[k].visualid ==
+ configs[j].vid) {
+ configprivs[j]->x_visual_depth =
+ dmxScreen->beVisuals[k].depth;
+ configprivs[j]->x_visual_class =
+ dmxScreen->beVisuals[k].class;
break;
}
}