Fix warnings when compiling with mingw32
[pspp-builds.git] / src / libpspp / i18n.c
index ffaa40489b042c7460480a0989bd6730a37c5e9b..a2c0af0f94e8f5a6d0188a16c994c131fe02605d 100644 (file)
@@ -67,7 +67,6 @@ recode_string(enum conv_id how,  const char *text, int length)
   char *outbuf = 0;
   size_t outbufferlength;
   size_t result;
-  char *ip ;
   char *op ;
   size_t inbytes = 0;
   size_t outbytes ;
@@ -92,13 +91,12 @@ recode_string(enum conv_id how,  const char *text, int length)
 
   outbuf = xmalloc(outbufferlength);
   op = outbuf;
-  ip = (char *) text;
 
   outbytes = outbufferlength;
   inbytes = length;
   
   do {
-    result = iconv(convertor[how], &ip, &inbytes, 
+    result = iconv(convertor[how], &text, &inbytes, 
                   &op, &outbytes);
 
     if ( -1 == result ) 
@@ -113,7 +111,7 @@ recode_string(enum conv_id how,  const char *text, int length)
              {
                *op++ = fallbackchar;
                outbytes--;
-               ip++;
+               text++;
                inbytes--;
                break;
              }
@@ -123,7 +121,6 @@ recode_string(enum conv_id how,  const char *text, int length)
            outbufferlength <<= 1;
            outbuf = xmalloc(outbufferlength);
            op = outbuf;
-           ip = (char *) text;
            outbytes = outbufferlength;
            inbytes = length;
            break;