pspp-dev
[Top][All Lists]
Advanced

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

fix i18n.c warning


From: Ben Pfaff
Subject: fix i18n.c warning
Date: Thu, 22 Feb 2007 15:52:59 -0800
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

The following patch fixes a warning about an incompatible pointer
type.  OK to check it in?

Index: src/libpspp/i18n.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/libpspp/i18n.c,v
retrieving revision 1.5
diff -u -p -r1.5 i18n.c
--- src/libpspp/i18n.c  21 Feb 2007 08:27:16 -0000      1.5
+++ src/libpspp/i18n.c  22 Feb 2007 23:25:10 -0000
@@ -64,6 +64,7 @@ create_iconv (const char* tocode, const 
 char *
 recode_string(enum conv_id how,  const char *text, int length)
 {
+  char *inbuf;
   char *outbuf = 0;
   size_t outbufferlength;
   size_t result;
@@ -94,9 +95,10 @@ recode_string(enum conv_id how,  const c
 
   outbytes = outbufferlength;
   inbytes = length;
-  
+
+  inbuf = text;
   do {
-    result = iconv(convertor[how], &text, &inbytes, 
+    result = iconv(convertor[how], &inbuf, &inbytes, 
                   &op, &outbytes);
 
     if ( -1 == result ) 
@@ -111,7 +113,7 @@ recode_string(enum conv_id how,  const c
              {
                *op++ = fallbackchar;
                outbytes--;
-               text++;
+               inbuf++;
                inbytes--;
                break;
              }


-- 
"Platonically Evil Monkey has been symbolically representing the darkest 
 fears of humanity since the dawn of literature and religion, and I think
 I speak for everyone when I give it a sidelong glance of uneasy recognition 
 this evening." --Scrymarch




reply via email to

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