From b508464cb87e65b3f9568bd70455e83bd41b5ce4 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 26 Mar 2007 10:10:44 +0000 Subject: [PATCH] Avoid compiler warnings. --- ChangeLog | 5 +++++ lib/uniconv/u8-conv-from-enc.c | 2 +- lib/uniconv/u8-strconv-to-enc.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75d701e93..edb56caf8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-03-25 Bruno Haible + * 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 + * lib/vasnprintf.c: Include langinfo.h. (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more multithread-safe. diff --git a/lib/uniconv/u8-conv-from-enc.c b/lib/uniconv/u8-conv-from-enc.c index d86ce1d7e..a193211ff 100644 --- a/lib/uniconv/u8-conv-from-enc.c +++ b/lib/uniconv/u8-conv-from-enc.c @@ -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 (); diff --git a/lib/uniconv/u8-strconv-to-enc.c b/lib/uniconv/u8-strconv-to-enc.c index 7dee051a7..35a922014 100644 --- a/lib/uniconv/u8-strconv-to-enc.c +++ b/lib/uniconv/u8-strconv-to-enc.c @@ -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) -- 2.11.0