id summary reporter owner description type status milestone component version severity resolution keywords cc 3846 Boost.Interprocess getline(istream, basic_string, CharT) contains duplicated variable int c1 wlam@… Ion Gaztañaga "As of Boost 1.41.0 (and in SVN as of today, 18 Jan 2010), the Boost.Interprocess container library implements template <...> std::istream &getline(std::istream&, basic_string<...> &, CharT) in boost/interprocess/containers/container/string.hpp with the following snippet: Line 2276: int c1; while (nread < s.max_size()) { int c1 = buf->sbumpc(); : } The outer declaration of c1 can trigger an (apparently correct) unused-variable warning in gcc. If the declaration is indeed unnecessary (e.g., is not some compiler-bug workaround), it looks trivial to remove: --- /home/wlam/boost_1_41_0/boost/interprocess/containers/container/string.hpp 2009-10-15 11:46:26.000000000 -0700 +++ ../boost/interprocess/containers/container/string.hpp 2010-01-18 20:29:36.635619313 -0800 @@ -2273,7 +2273,6 @@ std::basic_streambuf* buf = is.rdbuf(); s.clear(); - int c1; while (nread < s.max_size()) { int c1 = buf->sbumpc(); if (Traits::eq_int_type(c1, Traits::eof())) { " Patches closed Boost 1.45.0 interprocess Boost 1.41.0 Cosmetic fixed Wang Lam