]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix a gcc warning.
authorBruno Haible <bruno@clisp.org>
Mon, 10 Aug 2009 07:37:40 +0000 (09:37 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 10 Aug 2009 13:19:23 +0000 (15:19 +0200)
gnulib-local/ChangeLog
gnulib-local/lib/html-ostream.oo.c

index 935caed722048c8a7cf1577d0e3684a7f3d7025c..9a5c62ba5432c5688c44f7219dfb13cb7658c705 100644 (file)
@@ -1,3 +1,9 @@
+2009-08-10  Bruno Haible  <bruno@clisp.org>
+
+       Avoid gcc warning on Cygwin.
+       * lib/html-ostream.oo.c (html_ostream::write_mem): Change type of local
+       variable 'uc'.
+
 2009-05-23  Bruno Haible  <bruno@clisp.org>
 
        Avoid gcc warning "cast from pointer to integer of different size".
index 4d3957f1e13ffa9ed5f2c67e7e86a08964a0fbb5..9cfe816bcadf55de0ec75925433e6bf5e47158c2 100644 (file)
@@ -1,5 +1,5 @@
 /* Output stream that produces HTML output.
-   Copyright (C) 2006-2008 Free Software Foundation, Inc.
+   Copyright (C) 2006-2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software: you can redistribute it and/or modify
@@ -122,7 +122,7 @@ html_ostream::write_mem (html_ostream_t stream, const void *data, size_t len)
            while (insize > 0)
              {
                unsigned char c0;
-               unsigned int uc;
+               ucs4_t uc;
                int nbytes;
 
                c0 = ((const unsigned char *) inptr)[0];
@@ -177,7 +177,7 @@ html_ostream::write_mem (html_ostream_t stream, const void *data, size_t len)
                            /* Output non-ASCII characters in #&nnn;
                               notation.  */
                            char bytes[32];
-                           sprintf (bytes, "&#%d;", uc);
+                           sprintf (bytes, "&#%d;", (int) uc);
                            ostream_write_str (stream->destination, bytes);
                          }
                        break;