[PATCH 3/9] config: warning fixes

Adam Jackson ajax at redhat.com
Tue Oct 19 08:59:18 PDT 2010


xf86AutoConfig.c: In function ‘FreeList’:
xf86AutoConfig.c:123: warning: passing argument 1 of ‘free’ discards
qualifiers from pointer target type
/usr/include/stdlib.h:488: note: expected ‘void *’ but argument is of
type ‘const char *’

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/xfree86/common/xf86AutoConfig.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index 200cb8f..d06a561 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -120,7 +120,7 @@ FreeList(const char ***list, int *lines)
     int i;
 
     for (i = 0; i < *lines; i++) {
-	free((*list)[i]);
+	free((char *)((*list)[i]));
     }
     free(*list);
     *list = NULL;
-- 
1.7.2.3



More information about the xorg-devel mailing list