This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

warnings in collate.c


Hi,

Attached is a patch which removes warnings in
collate.c.  This just silences the warnings.
There might be a better way but I didn't see it.

2008-11-18 Joel Sherrill <joel.sherrill@oarcorp.com>

* libc/posix/collate.c: Fix warnings.

--
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill@OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
  Support Available             (256) 722-9985


Index: collate.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/posix/collate.c,v
retrieving revision 1.1
diff -u -r1.1 collate.c
--- collate.c	31 Oct 2008 21:03:41 -0000	1.1
+++ collate.c	18 Nov 2008 23:10:33 -0000
@@ -130,7 +130,7 @@
 	while(*s) {
 		nlen = len + strlen(__collate_substitute_table[*s]);
 		if (dest_len <= nlen) {
-			dest_str = reallocf(dest_str, dest_len = nlen + delta);
+			dest_str = (u_char *)reallocf(dest_str, dest_len = nlen + delta);
 			if(dest_str == NULL)
 				__collate_err(EX_OSERR, __FUNCTION__);
 		}
@@ -180,7 +180,7 @@
 
 	write(STDERR_FILENO, s, strlen(s));
 	write(STDERR_FILENO, ": ", 2);
-	free(s);
+	free((void *)s);
 	s = f;
 	write(STDERR_FILENO, s, strlen(s));
 	write(STDERR_FILENO, ": ", 2);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]