cid#1608598 silence Overflowed constant
and cid#1607946 Overflowed constant cid#1608526 Overflowed integer argument cid#1608611 Overflowed integer argument Change-Id: Iec21df2f3d7dc8fba3872c6a70466ae12026a49d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174557 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
This commit is contained in:
@@ -4736,7 +4736,10 @@ bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
|
||||
static_cast<SCSIZE>( aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1 ) :
|
||||
static_cast<SCSIZE>( aSourceArea.aEnd.Col() - aSourceArea.aStart.Col() + 1 );
|
||||
if ( nCount >= nTotLines )
|
||||
{
|
||||
assert(nTotLines > 0 && "coverity 2023.12.2");
|
||||
nCount = nTotLines - 1;
|
||||
}
|
||||
|
||||
switch (eDir)
|
||||
{
|
||||
|
||||
@@ -711,7 +711,7 @@ bool SmCursor::InsertRow() {
|
||||
//Find parent and offset in parent
|
||||
SmStructureNode *pLineParent = pLine->GetParent();
|
||||
int nParentIndex = pLineParent->IndexOfSubNode(pLine);
|
||||
assert(nParentIndex >= 0);
|
||||
assert(nParentIndex >= 0 && nParentIndex < INT_MAX);
|
||||
|
||||
//Discover the context of this command
|
||||
SmTableNode *pTable = nullptr;
|
||||
@@ -726,7 +726,7 @@ bool SmCursor::InsertRow() {
|
||||
//NOTE: This hack might give problems if we stop ignoring SmAlignNode
|
||||
pTable = static_cast<SmTableNode*>(pLineParent->GetParent());
|
||||
nTableIndex = pTable->IndexOfSubNode(pLineParent);
|
||||
assert(nTableIndex >= 0);
|
||||
assert(nTableIndex >= 0 && nTableIndex < INT_MAX);
|
||||
}
|
||||
if(pLineParent->GetType() == SmNodeType::Matrix)
|
||||
pMatrix = static_cast<SmMatrixNode*>(pLineParent);
|
||||
|
||||
@@ -229,7 +229,7 @@ bool SwCursor::GotoNextFootnoteAnchor()
|
||||
{
|
||||
// search backwards
|
||||
pTextFootnote = nullptr;
|
||||
while( nPos )
|
||||
while (nPos > 0)
|
||||
{
|
||||
pTextFootnote = rFootnoteArr[ --nPos ];
|
||||
if( CmpLE( *pTextFootnote, nNdPos, nCntPos ) )
|
||||
|
||||
@@ -364,11 +364,12 @@ bool GraphicObject::ImplDrawTiled(OutputDevice& rOut, const tools::Rectangle& rA
|
||||
rOut.IntersectClipRegion( rArea );
|
||||
|
||||
// Paint all tiles
|
||||
|
||||
|
||||
auto nOutAreaWidth = aOutArea.GetWidth();
|
||||
auto nOutAreaHeight = aOutArea.GetHeight();
|
||||
assert(nOutAreaWidth >= 0 && nOutAreaHeight >= 0 && "coverity 2023.12.2");
|
||||
bRet = ImplDrawTiled(rOut, aOutStart,
|
||||
(aOutArea.GetWidth() + aOutArea.Left() - aOutStart.X() + rSizePixel.Width() - 1) / rSizePixel.Width(),
|
||||
(aOutArea.GetHeight() + aOutArea.Top() - aOutStart.Y() + rSizePixel.Height() - 1) / rSizePixel.Height(),
|
||||
(nOutAreaWidth + aOutArea.Left() - aOutStart.X() + rSizePixel.Width() - 1) / rSizePixel.Width(),
|
||||
(nOutAreaHeight + aOutArea.Top() - aOutStart.Y() + rSizePixel.Height() - 1) / rSizePixel.Height(),
|
||||
rSizePixel, pAttr);
|
||||
|
||||
rOut.Pop();
|
||||
|
||||
Reference in New Issue
Block a user