[GRASS-SVN] r63461 - grass/trunk/lib/driver
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Dec 9 13:55:38 PST 2014
Author: martinl
Date: 2014-12-09 13:55:38 -0800 (Tue, 09 Dec 2014)
New Revision: 63461
Modified:
grass/trunk/lib/driver/text3.c
Log:
driverlib: fix some compilation warnings
Modified: grass/trunk/lib/driver/text3.c
===================================================================
--- grass/trunk/lib/driver/text3.c 2014-12-09 20:30:43 UTC (rev 63460)
+++ grass/trunk/lib/driver/text3.c 2014-12-09 21:55:38 UTC (rev 63461)
@@ -137,18 +137,19 @@
res = 2 * (len + 1);
*out = G_calloc(1, res);
- p1 = in;
+ p1 = (const unsigned char *)in;
p2 = *out;
#ifdef HAVE_ICONV_H
{
- size_t ret;
iconv_t cd;
i = res;
- if ((cd = iconv_open("UCS-2BE", from)) < 0)
+ cd = iconv_open("UCS-2BE", from);
+ if (cd == (iconv_t) -1)
return -1;
- ret = iconv(cd, (char **)&p1, &len, (char **)&p2, &i);
+ if (iconv(cd, (char **)&p1, &len, (char **)&p2, &i) == (size_t) -1)
+ return -1;
iconv_close(cd);
res -= i;
More information about the grass-commit
mailing list