bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

u16-conv-to-enc; small fix


From: Bruno Haible
Subject: u16-conv-to-enc; small fix
Date: Wed, 16 Apr 2008 03:35:20 +0200
User-agent: KMail/1.5.4

Another warning on NetBSD/x86:

uniconv/u-conv-to-enc.h:70: warning: return makes integer from pointer without 
a cast

This fixes it:

2008-04-15  Bruno Haible  <address@hidden>

        * lib/uniconv/u-conv-to-enc.h (FUNC): Fix return value when U_TO_U8
        fails.

--- lib/uniconv/u-conv-to-enc.h.orig    2008-04-16 03:33:45.000000000 +0200
+++ lib/uniconv/u-conv-to-enc.h 2008-04-16 03:32:06.000000000 +0200
@@ -1,5 +1,5 @@
 /* Conversion from UTF-16/UTF-32 to legacy encodings.
-   Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2006-2008 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as published
@@ -67,7 +67,7 @@
 
   utf8_src = U_TO_U8 (src, srclen, tmpbuf, &tmpbufsize);
   if (utf8_src == NULL)
-    return NULL;
+    return -1;
   utf8_srclen = tmpbufsize;
 
   if (offsets != NULL)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]