Kaydet (Commit) aab9c9de authored tarafından Stephan Bergmann's avatar Stephan Bergmann Kaydeden (comit) Luboš Luňák

Detect SvStream::operator<< calls with bool args w/o using -Wsign-promo

...as -Wsign-promo caused other problems and has been removed again with
488823a1 "Remove -Wsign-promo."  It had
originally been introduced with e8bbb768 "ensure
correct export size type in stream operation," apparently to detect an
SvStream::operator<< call with a bool argument that would pick the "int"
overload instead of the "unsigned char" (aka sal_Bool) one (which would have
happened to trigger the -Wsign-promo warning "by luck," given that sal_Bool is
unsigned char and not signed char, say).

Change-Id: I0bf4389753e53a535bd90ca2a98b6a5be63d179a
Reviewed-on: https://gerrit.libreoffice.org/1798Reviewed-by: 's avatarLuboš Luňák <l.lunak@suse.cz>
Tested-by: 's avatarLuboš Luňák <l.lunak@suse.cz>
üst b9c21b97
......@@ -324,6 +324,8 @@ public:
SvStream& operator<<( sal_Int32 nInt32 );
SvStream& operator<<( sal_Int64 nInt64 );
SvStream& operator<<( bool b )
{ return operator<<(static_cast< sal_Bool >(b)); }
SvStream& operator<<( signed char nChar );
SvStream& operator<<( char nChar );
SvStream& operator<<( unsigned char nChar );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment