Hi,
This fixes a few warnings that occur in libc++'s headers, when building
with -Wsystem-headers:
In file included from /usr/include/c++/v1/iostream:40:
In file included from /usr/include/c++/v1/istream:156:
In file included from /usr/include/c++/v1/ostream:132:
/usr/include/c++/v1/locale:2878:25: error: suggest braces around initialization
of subobject [-Werror,-Wmissing-braces]
{pattern __p = {symbol, sign, none, value}; return __p;}
^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/locale:2880:25: error: suggest braces around initialization
of subobject [-Werror,-Wmissing-braces]
{pattern __p = {symbol, sign, none, value}; return __p;}
^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/locale:3194:35: error: unused variable '__et'
[-Werror,-Wunused-variable]
ios_base::iostate __et = ios_base::goodbit;
^
The first two warnings are because money_base::pattern is declared as a
struct containing a char array, so the char array itself needs
additional braces.
The third warning is because r152501 changed some code in __do_get()'s
money_base::symbol case, which made the __et variable unnecessary.
-Dimitry
This fixes a few warnings that occur in libc++'s headers, when building
with -Wsystem-headers:
In file included from /usr/include/c++/v1/iostream:40:
In file included from /usr/include/c++/v1/istream:156:
In file included from /usr/include/c++/v1/ostream:132:
/usr/include/c++/v1/locale:2878:25: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{pattern __p = {symbol, sign, none, value}; return __p;}
^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/locale:2880:25: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
{pattern __p = {symbol, sign, none, value}; return __p;}
^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/locale:3194:35: error: unused variable '__et' [-Werror,-Wunused-variable]
ios_base::iostate __et = ios_base::goodbit;
^
The first two warnings are because money_base::pattern is declared as a
struct containing a char array, so the char array itself needs
additional braces.
The third warning is because r152501 changed some code in __do_get()'s
money_base::symbol case, which made the __et variable unnecessary.
Index: include/locale
===================================================================
--- include/locale (revision 166410)
+++ include/locale (working copy)
@@ -2876,9 +2876,9 @@ class _LIBCPP_VISIBLE moneypunct
virtual string_type do_negative_sign() const {return string_type(1, '-');}
virtual int do_frac_digits() const {return 0;}
virtual pattern do_pos_format() const
- {pattern __p = {symbol, sign, none, value}; return __p;}
+ {pattern __p = {{symbol, sign, none, value}}; return __p;}
virtual pattern do_neg_format() const
- {pattern __p = {symbol, sign, none, value}; return __p;}
+ {pattern __p = {{symbol, sign, none, value}}; return __p;}
};
template <class _CharT, bool _International>
@@ -3192,7 +3192,6 @@ money_get<_CharT, _InputIterator>::__do_get(iter_t
bool __sb = __flags & ios_base::showbase;
if (__sb || __more_needed)
{
- ios_base::iostate __et = ios_base::goodbit;
typename string_type::const_iterator __sym_space_end = __sym.begin();
if (__p > 0 && (__pat.field[__p - 1] == money_base::none ||
__pat.field[__p - 1] == money_base::space)) {
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits