about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--intl/dcigettext.c10
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f50b87b94..d9b945678f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-09  Bruno Haible  <haible@clisp.cons.org>
+
+	* intl/dcigettext.c (transmem_block_t): Change to unsigned char, to
+	avoid compiler warning.
+	(_nl_find_msg): Add casts to avoid compiler warnings.
+
 2001-03-21  Ulrich Drepper  <drepper@redhat.com>
 
 	* gmon/Makefile (routines): Add sprofil.
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
index cd3392128b..dcdc93c25d 100644
--- a/intl/dcigettext.c
+++ b/intl/dcigettext.c
@@ -339,7 +339,7 @@ typedef struct transmem_list
 } transmem_block_t;
 static struct transmem_list *transmem_list;
 #else
-typedef char transmem_block_t;
+typedef unsigned char transmem_block_t;
 #endif
 
 
@@ -793,7 +793,7 @@ _nl_find_msg (domain_file, msgid, lengthp)
 
 	  __libc_lock_lock (lock);
 
-	  inbuf = result;
+	  inbuf = (const unsigned char *) result;
 	  outbuf = freemem + sizeof (size_t);
 
 	  malloc_count = 0;
@@ -834,7 +834,9 @@ _nl_find_msg (domain_file, msgid, lengthp)
 		goto resize_freemem;
 
 	      outleft = freemem_size - sizeof (size_t);
-	      if (iconv (domain->conv, &inptr, &inleft, &outptr, &outleft)
+	      if (iconv (domain->conv,
+			 (ICONV_CONST char **) &inptr, &inleft,
+			 &outptr, &outleft)
 		  != (size_t) (-1))
 		{
 		  outbuf = (unsigned char *) outptr;
@@ -901,7 +903,7 @@ _nl_find_msg (domain_file, msgid, lengthp)
 	  /* We have now in our buffer a converted string.  Put this
 	     into the table of conversions.  */
 	  *(size_t *) freemem = outbuf - freemem - sizeof (size_t);
-	  domain->conv_tab[act] = freemem;
+	  domain->conv_tab[act] = (char *) freemem;
 	  /* Shrink freemem, but keep it aligned.  */
 	  freemem_size -= outbuf - freemem;
 	  freemem = outbuf;