]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/transcode.c
Merge changes from CUPS 1.5svn-r9374.
[thirdparty/cups.git] / cups / transcode.c
index 7b98f251850fd45b01d240e18a2bd7af87229029..a24c8a851c66b68b350ade7f99fef8e127bd813c 100644 (file)
@@ -88,9 +88,10 @@ cupsCharsetToUTF8(
     const cups_encoding_t encoding)    /* I - Encoding */
 {
   cups_utf8_t  *destptr;               /* Pointer into UTF-8 buffer */
-  int          bytes;                  /* Number of bytes converted */
+#ifdef HAVE_ICONV_H 
   size_t       srclen,                 /* Length of source string */
                outBytesLeft;           /* Bytes remaining in output buffer */
+#endif /* HAVE_ICONV_H */
 
 
  /*
@@ -172,9 +173,10 @@ cupsCharsetToUTF8(
   {
     srclen       = strlen(src);
     outBytesLeft = maxout - 1;
-    bytes        = (int)iconv(map_to_utf8, (char **)&src, &srclen,
-                             (char **)&destptr, &outBytesLeft);
-    *destptr     = '\0';
+
+    iconv(map_to_utf8, (char **)&src, &srclen, (char **)&destptr,
+         &outBytesLeft);
+    *destptr = '\0';
 
     _cupsMutexUnlock(&map_mutex);
 
@@ -206,9 +208,10 @@ cupsUTF8ToCharset(
     const cups_encoding_t encoding)    /* I - Encoding */
 {
   char         *destptr;               /* Pointer into destination */
-  int          bytes;                  /* Number of bytes converted */
+#ifdef HAVE_ICONV_H 
   size_t       srclen,                 /* Length of source string */
                outBytesLeft;           /* Bytes remaining in output buffer */
+#endif /* HAVE_ICONV_H */
 
 
  /*
@@ -293,9 +296,9 @@ cupsUTF8ToCharset(
   {
     srclen       = strlen((char *)src);
     outBytesLeft = maxout - 1;
-    bytes        = (int)iconv(map_from_utf8, (char **)&src, &srclen,
-                             &destptr, &outBytesLeft);
-    *destptr     = '\0';
+
+    iconv(map_from_utf8, (char **)&src, &srclen, &destptr, &outBytesLeft);
+    *destptr = '\0';
 
     _cupsMutexUnlock(&map_mutex);