Potentially uninitialized variable warning in basic_ios.tcc
Benjamin Kosnik
bkoz@redhat.com
Thu Feb 7 09:11:00 GMT 2002
> (The same holds for the function basic_ios::narrow above that.) Was this
> intended? Since _M_check_facet returns "true" or throws a bad_cast
It's the new warning code.
> char
> basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const
> ! {
> ! char __ret;
+ char __ret = __dfault.
> if (_M_check_facet(_M_ios_fctype))
> ! __ret = _M_ios_fctype->narrow(__c, __dfault);
> ! return __ret;
> }
>
> template<typename _CharT, typename _Traits>
> _CharT
> basic_ios<_CharT, _Traits>::widen(char __c) const
> {
> ! char_type __ret;
+ char_type __ret = char_type();
This would probably be better.
More information about the Libstdc++
mailing list