[PATCH 1/4] Fix a couple of compiler warnings

Keith Packard keithp at keithp.com
Fri May 7 23:19:18 PDT 2010


Signed-off-by: Keith Packard <keithp at keithp.com>
---
 config/udev.c             |    6 +++---
 hw/dmx/dmxgc.c            |    2 ++
 hw/dmx/glxProxy/glxcmds.c |    2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/config/udev.c b/config/udev.c
index 452fb5a..a56fcd6 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -81,12 +81,12 @@ device_added(struct udev_device *udev_device)
     if (!name)
         name = "(unnamed)";
     else
-        attrs.product = name;
+        attrs.product = (char *) name;
     add_option(&options, "name", name);
 
     add_option(&options, "path", path);
     add_option(&options, "device", path);
-    attrs.device = path;
+    attrs.device = (char *) path;
     attrs.tags = xstrtokenize(udev_device_get_property_value(udev_device, "ID_INPUT.tags"), ",");
 
     config_info = Xprintf("udev:%s", syspath);
@@ -119,7 +119,7 @@ device_added(struct udev_device *udev_device)
             else if (!strcasecmp(tmp, "options"))
                 add_option(&options, "xkb_options", value);
         } else if (!strcmp(key, "ID_VENDOR")) {
-            attrs.vendor = value;
+            attrs.vendor = (char *) value;
         } else if (!strcmp(key, "ID_INPUT_KEY")) {
             attrs.flags |= ATTR_KEYBOARD;
         } else if (!strcmp(key, "ID_INPUT_MOUSE")) {
diff --git a/hw/dmx/dmxgc.c b/hw/dmx/dmxgc.c
index eb21d3c..40f312f 100644
--- a/hw/dmx/dmxgc.c
+++ b/hw/dmx/dmxgc.c
@@ -382,6 +382,7 @@ void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects)
 	}
 	break;
 
+#if 0
     case CT_PIXMAP:
     case CT_UNSORTED:
     case CT_YSORTED:
@@ -390,6 +391,7 @@ void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects)
 	/* These clip types are condensed down to either NONE or REGION
            in the mi code */
 	break;
+#endif
     }
 
     DMX_GC_FUNC_EPILOGUE(pGC);
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 31fd431..3dfa6a2 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -1646,7 +1646,7 @@ static int CreateGLXPixmap(__GLXclientState *cl,
 	return BadMatch;
     }
 
-    if (fbconfigId == NULL && visual == NULL) {
+    if (fbconfigId == 0 && visual == 0) {
 	  return BadValue;
     }
 
-- 
1.7.0.4



More information about the xorg-devel mailing list