[PATCH 3/9] config: warning fixes

Daniel Stone daniel at fooishbar.org
Thu Dec 30 18:00:17 PST 2010


From: Adam Jackson <ajax at redhat.com>

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>
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
---
 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 eb61f87..5c6e721 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