../src/wcmValidateDevice.c: In function 'wcmIsAValidType':
../src/wcmValidateDevice.c:139:2: warning: passing argument 3 of 
'xf86CheckStrOption' discards 'const' qualifier from pointer target type 
[enabled by default]
In file included from /usr/include/xorg/xf86str.h:43:0,
                 from /usr/include/xorg/xf86.h:44,
                 from ../src/xf86Wacom.h:33,
                 from ../src/wcmValidateDevice.c:23:
/usr/include/xorg/xf86Opt.h:87:24: note: expected 'char *' but argument is of 
type 'const char *'

Signed-off-by: Jason Gerecke <killert...@gmail.com>
---
 src/wcmValidateDevice.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
index 28321bc..8eadfdb 100644
--- a/src/wcmValidateDevice.c
+++ b/src/wcmValidateDevice.c
@@ -135,7 +135,7 @@ Bool wcmIsAValidType(InputInfoPtr pInfo, const char* type)
        int j, k, ret = FALSE;
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
        WacomCommonPtr common = priv->common;
-       char* dsource = xf86CheckStrOption(pInfo->options, "_source", "");
+       char* dsource = xf86CheckStrOption(pInfo->options, "_source", NULL);
 
        if (!type)
        {
@@ -162,7 +162,7 @@ Bool wcmIsAValidType(InputInfoPtr pInfo, const char* type)
                                                    ret = FALSE;
                                        }
                                }
-                               else if (!strlen(dsource)) /* an user defined 
type */
+                               else if (!dsource || !strlen(dsource)) /* an 
user defined type */
                                {
                                        /* assume it is a valid type */
                                        SETBIT(common->wcmKeys, 
wcmType[j].tool[k]);
-- 
1.7.10.2


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to