[PATCH 4/9] loader: warning fix

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


From: Adam Jackson <ajax at redhat.com>

loadmod.c: In function ‘FreeSubdirs’:
loadmod.c:377: 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/loader/loadmod.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index 3b3511c..eaa99e8 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -374,7 +374,7 @@ FreeSubdirs(const char **subdirs)
 
     if (subdirs) {
 	for (s = subdirs; *s; s++)
-	    free(*s);
+	    free((char *)*s);
 	free(subdirs);
     }
 }
-- 
1.7.2.3



More information about the xorg-devel mailing list