From: Amos Jeffries Date: Wed, 1 Feb 2012 07:53:53 +0000 (-0700) Subject: Bug 3470: GCC 4.7 X-Git-Tag: SQUID_3_1_19~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2fb012a373845175cd3a481038ca97cf93f6c2e;p=thirdparty%2Fsquid.git Bug 3470: GCC 4.7 --- diff --git a/src/StoreEntryStream.h b/src/StoreEntryStream.h index fb9b715759..97511f38ee 100644 --- a/src/StoreEntryStream.h +++ b/src/StoreEntryStream.h @@ -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::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);