[Libreoffice-commits] .: 5 commits - solenv/gbuild solenv/inc sw/source
Tor Lillqvist
tml at kemper.freedesktop.org
Tue Oct 25 07:26:24 PDT 2011
solenv/gbuild/platform/windows.mk | 2 ++
solenv/inc/wntmsc.mk | 2 +-
sw/source/core/layout/atrfrm.cxx | 9 ++++++---
sw/source/core/layout/layact.cxx | 2 +-
sw/source/core/layout/sectfrm.cxx | 8 ++++----
sw/source/filter/ww8/ww8toolbar.cxx | 4 ++--
6 files changed, 16 insertions(+), 11 deletions(-)
New commits:
commit 457af8039a234d585d7179007337207d8fe3f460
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Oct 25 17:18:26 2011 +0300
WaE: truncation of constant value
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index 3f2c333..d615d86 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -799,7 +799,7 @@ Xst::Print( FILE* fp )
indent_printf( fp, " %s", rtl::OUStringToOString( sString, RTL_TEXTENCODING_UTF8 ).getStr() );
}
-Tcg::Tcg() : nTcgVer( 255 )
+Tcg::Tcg() : nTcgVer( -1 )
{
}
@@ -808,7 +808,7 @@ bool Tcg::Read(SvStream &rS)
OSL_TRACE("Tcg::Read() stream pos 0x%x", rS.Tell() );
nOffSet = rS.Tell();
rS >> nTcgVer;
- if ( nTcgVer != (sal_Int8)255 )
+ if ( nTcgVer != -1 )
return false;
tcg.reset( new Tcg255() );
return tcg->Read( rS );
commit 4f32f6f9903d90e884ebab954c60bad1a0a91e82
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Oct 25 15:00:18 2011 +0300
WaE: ignore also MSVC warning C4706: assignment within conditional expression
Sad, but it's too tedious to refactor code like:
while( (pLayout = GetLayout(pLayout)) )
{
...
}
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index c22a187..eee6bad 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -122,6 +122,7 @@ gb_CFLAGS := \
-wd4668 \
-wd4675 \
-wd4692 \
+ -wd4706 \
-wd4710 \
-wd4711 \
-wd4373 \
@@ -175,6 +176,7 @@ gb_CXXFLAGS := \
-wd4668 \
-wd4675 \
-wd4692 \
+ -wd4706 \
-wd4710 \
-wd4711 \
-wd4373 \
diff --git a/solenv/inc/wntmsc.mk b/solenv/inc/wntmsc.mk
index 02e2d91..3680ce9 100644
--- a/solenv/inc/wntmsc.mk
+++ b/solenv/inc/wntmsc.mk
@@ -196,7 +196,7 @@ CFLAGSOUTOBJ=-Fo
CFLAGSWARNCXX=-Wall -wd4061 -wd4127 -wd4191 -wd4217 -wd4242 -wd4244 -wd4245 -wd4250 -wd4251 -wd4275 \
-wd4290 -wd4294 -wd4355 -wd4511 -wd4512 -wd4514 -wd4555 -wd4611 -wd4625 -wd4626 \
- -wd4640 -wd4675 -wd4710 -wd4711 -wd4786 -wd4800 -wd4820 -wd4503 -wd4619 \
+ -wd4640 -wd4675 -wd4706 -wd4710 -wd4711 -wd4786 -wd4800 -wd4820 -wd4503 -wd4619 \
-wd4365 -wd4668 -wd4738 -wd4826 -wd4350 -wd4505 -wd4692 -wd4189 -wd4005 \
-wd4180
CFLAGSWARNCC=$(CFLAGSWARNCXX) -wd4255
commit 6047d5952dc119cd2de3f9b2d6c556e8bfd8fcac
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Oct 25 15:48:51 2011 +0300
WaE: unsafe mix of type 'bool' and type 'sal_Bool' in operation
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 6879add..5091d5f 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -2474,8 +2474,8 @@ void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew
sal_Bool bChgMyEndn = IsEndnoteAtMyEnd();
CalcFtnAtEndFlag();
CalcEndAtEndFlag();
- bChgFtn = ( bChgFtn != IsFtnAtEnd() ) ||
- ( bChgEndn != IsEndnAtEnd() ) ||
+ bChgFtn = ( bChgFtn != (sal_Bool) IsFtnAtEnd() ) ||
+ ( bChgEndn != (sal_Bool) IsEndnAtEnd() ) ||
( bChgMyEndn != IsEndnoteAtMyEnd() );
ChgColumns( aCol, rNewCol, bChgFtn );
rInvFlags |= 0x10;
@@ -2498,7 +2498,7 @@ void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew
{
sal_Bool bOld = IsFtnAtEnd();
CalcFtnAtEndFlag();
- if( bOld != IsFtnAtEnd() )
+ if( bOld != (sal_Bool) IsFtnAtEnd() )
{
const SwFmtCol& rNewCol = GetFmt()->GetCol();
ChgColumns( rNewCol, rNewCol, sal_True );
@@ -2513,7 +2513,7 @@ void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew
sal_Bool bOld = IsEndnAtEnd();
sal_Bool bMyOld = IsEndnoteAtMyEnd();
CalcEndAtEndFlag();
- if( bOld != IsEndnAtEnd() || bMyOld != IsEndnoteAtMyEnd())
+ if( bOld != (sal_Bool) IsEndnAtEnd() || bMyOld != IsEndnoteAtMyEnd())
{
const SwFmtCol& rNewCol = GetFmt()->GetCol();
ChgColumns( rNewCol, rNewCol, sal_True );
commit ec1531b327122093c6032063c5cc789d4df4d06f
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Oct 25 15:43:12 2011 +0300
WaE: unsafe mix of type 'bool' and type 'sal_Bool' in operation
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index f48061b..a7c5036 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -2390,7 +2390,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
bActions |= aTmp != pSh->VisArea();
if ( aTmp == pSh->VisArea() && pSh->ISA(SwCrsrShell) )
{
- bActions |= aBools[nBoolIdx] !=
+ bActions |= ((sal_Bool) aBools[nBoolIdx]) !=
static_cast<SwCrsrShell*>(pSh)->GetCharRect().IsOver( pSh->VisArea() );
}
}
commit ab2cc86cf5d69bfaf765f3d4aa314dcb5339f533
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Oct 25 15:40:30 2011 +0300
WaE: unreachable code
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index afe2776..c89ef90 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -2796,7 +2796,11 @@ void SwFlyFrmFmt::MakeFrms()
SwCntntNode *pCNd =
aAnchorAttr.GetCntntAnchor()->nNode.GetNode().GetCntntNode();
SwIterator<SwFrm,SwCntntNode> aIter( *pCNd );
- for (SwFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
+ for (SwFrm* pFrm = aIter.First();
+ pFrm;
+ /* unreachable, note unconditional break below
+ pFrm = aIter.Next()
+ */ )
{
pPage = pFrm->FindPageFrm();
if( pPage )
@@ -2808,7 +2812,7 @@ void SwFlyFrmFmt::MakeFrms()
SetFmtAttr( aAnchorAttr );
}
break;
- }
+ }
}
while ( pPage )
{
@@ -2934,7 +2938,6 @@ sal_Bool SwFlyFrmFmt::GetInfo( SfxPoolItem& rInfo ) const
default:
return SwFrmFmt::GetInfo( rInfo );
}
- return sal_True;
}
// #i73249#
More information about the Libreoffice-commits
mailing list