]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3470: GCC 4.7
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 1 Feb 2012 07:53:53 +0000 (00:53 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 1 Feb 2012 07:53:53 +0000 (00:53 -0700)
src/StoreEntryStream.h

index fb9b7157599d26013c020051ed778b02a8b12d3a..97511f38ee790407b0f797448a2b8f7bb2e6ac80 100644 (file)
@@ -70,7 +70,10 @@ protected:
             return traits_type::eof();
 
         if (aChar != traits_type::eof()) {
-            char chars[1] = {aChar};
+            // NP: cast because GCC promotes int_type to 32-bit type
+            //     std::basic_streambuf<char>::int_type {aka int}
+            //     despite the definition with 8-bit type value.
+            char chars[1] = {char(aChar)};
 
             if (aChar != traits_type::eof())
                 theEntry->append(chars, 1);