Avoid compiler warnings.
authorBruno Haible <bruno@clisp.org>
Mon, 26 Mar 2007 10:10:44 +0000 (10:10 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 26 Mar 2007 10:10:44 +0000 (10:10 +0000)
ChangeLog
lib/uniconv/u8-conv-from-enc.c
lib/uniconv/u8-strconv-to-enc.c

index 75d701e9326f450c228afe79b9ae45c7a8aaa899..edb56caf8503fb288b81592f566a65fab683b992 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-25  Bruno Haible  <bruno@clisp.org>
+
+       * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
+       * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
+
 2007-03-25  Bruno Haible  <bruno@clisp.org>
 
        * lib/vasnprintf.c: Include langinfo.h.
index d86ce1d7e8933222f36c1cf1d69a012bd8e5fced..a193211ff1a71a2c903d10aa79c5ae5ff5aa202c 100644 (file)
@@ -55,7 +55,7 @@ u8_conv_from_encoding (const char *fromcode,
 
          for (i = 0; i < srclen; )
            {
-             int count = u8_mblen (src + i, srclen - i);
+             int count = u8_mblen ((const uint8_t *) src + i, srclen - i);
              /* We can rely on count > 0 because of the previous u8_check.  */
              if (count <= 0)
                abort ();
index 7dee051a77a18b1ba50402be1b826e90e642779f..35a922014a79b7a6c597ea3d62ad3fb170b72941 100644 (file)
@@ -63,7 +63,7 @@ u8_strconv_to_encoding (const uint8_t *string,
     {
       result = NULL;
       length = 0;
-      if (mem_iconveha (string, u8_strlen (string) + 1,
+      if (mem_iconveha ((const char *) string, u8_strlen (string) + 1,
                        "UTF-8", tocode,
                        handler == iconveh_question_mark, handler,
                        NULL, &result, &length) < 0)