summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-06-13 10:16:56 +0200
committerNoel Grandin <noel@peralex.com>2015-06-15 14:06:31 +0200
commitdcf6abfcdf3f4b7aec5796c9f6c806889328135f (patch)
treef0d7081b5454bbe58318ec87dcc6b5465ed16965
parent8f60697cf8e5227d503738e3c186433ac5dacfc8 (diff)
cppcheck:unreadVariable
Change-Id: I03981ceba67280e8ed98a9add7f24b3bd958d522
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx1
-rw-r--r--compilerplugins/clang/rendercontext.cxx6
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx37
-rw-r--r--framework/source/uifactory/menubarfactory.cxx2
-rw-r--r--linguistic/source/convdicxml.cxx4
-rw-r--r--oox/source/ppt/pptimport.cxx2
-rw-r--r--sal/osl/unx/nlsupport.cxx1
-rw-r--r--sc/source/core/tool/interpr4.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx3
-rw-r--r--sc/source/ui/view/dbfunc.cxx1
-rw-r--r--sc/source/ui/view/gridwin4.cxx1
-rw-r--r--sd/source/core/drawdoc3.cxx4
-rw-r--r--sd/source/ui/dlg/RemoteDialogClientBox.cxx1
-rw-r--r--setup_native/source/win32/wintools/makecab/makecab.c1
-rw-r--r--setup_native/source/win32/wintools/msidb/msidb.c2
-rw-r--r--sfx2/source/doc/objstor.cxx2
-rw-r--r--sfx2/source/view/viewsh.cxx5
-rw-r--r--shell/source/win32/shlxthandler/util/iso8601_converter.cxx1
-rw-r--r--slideshow/source/engine/slide/targetpropertiescreator.cxx3
-rw-r--r--stoc/source/implementationregistration/implreg.cxx1
-rw-r--r--svtools/source/uno/unoevent.cxx3
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx2
-rw-r--r--sw/source/core/text/itradj.cxx3
-rw-r--r--sw/source/ui/index/cnttab.cxx1
-rw-r--r--sw/source/ui/vba/vbarangehelper.cxx1
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx4
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx2
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx3
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx6
-rw-r--r--vcl/unx/generic/dtrans/X11_transferable.cxx2
-rw-r--r--vcl/unx/gtk/window/gtksalframe.cxx4
-rw-r--r--xmlhelp/source/cxxhelp/qe/DocGenerator.cxx1
-rw-r--r--xmloff/source/style/numehelp.cxx2
33 files changed, 32 insertions, 82 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 74e1baddd52b..d89abccf42ae 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -1428,7 +1428,6 @@ uno::Reference< uno::XInterface > SAL_CALL ChartDocumentWrapper::createInstance(
if( xAddIn.is() )
{
xResult = xAddIn;
- bServiceFound = true;
}
}
}
diff --git a/compilerplugins/clang/rendercontext.cxx b/compilerplugins/clang/rendercontext.cxx
index cc2a945769c3..037c7bb2d1fa 100644
--- a/compilerplugins/clang/rendercontext.cxx
+++ b/compilerplugins/clang/rendercontext.cxx
@@ -93,9 +93,7 @@ bool RenderContext::VisitCXXMemberCallExpr(const CXXMemberCallExpr* pCXXMemberCa
}
// for calling through a pointer
const ImplicitCastExpr *pImplicitCastExpr = dyn_cast<ImplicitCastExpr>(pCXXMemberCallExpr->getImplicitObjectArgument());
- std::string x = "0"; // for debugging
if (pImplicitCastExpr) {
- x += "1";
QualType aType = pImplicitCastExpr->getSubExpr()->getType();
if (aType->isPointerType())
aType = aType->getPointeeType();
@@ -106,7 +104,6 @@ bool RenderContext::VisitCXXMemberCallExpr(const CXXMemberCallExpr* pCXXMemberCa
// for calling through a reference
const DeclRefExpr *pDeclRefExpr = dyn_cast<DeclRefExpr>(pCXXMemberCallExpr->getImplicitObjectArgument());
if (pDeclRefExpr) {
- x += "2";
QualType aType = pDeclRefExpr->getType();
std::string t2 = aType.getAsString();
if (t2 == "vcl::RenderContext" || t2 == "const vcl::RenderContext")
@@ -115,18 +112,15 @@ bool RenderContext::VisitCXXMemberCallExpr(const CXXMemberCallExpr* pCXXMemberCa
// for calling through a chain of methods
const CXXMemberCallExpr *pMemberExpr = dyn_cast<CXXMemberCallExpr>(pCXXMemberCallExpr->getImplicitObjectArgument());
if (pMemberExpr) {
- x += "3";
QualType aType = pMemberExpr->getType();
if (aType->isPointerType())
aType = aType->getPointeeType();
std::string t2 = aType.getAsString();
- x += t2;
if (t2 == "vcl::RenderContext" || t2 == "const vcl::RenderContext")
return true;
}
report(
DiagnosticsEngine::Warning,
- // + x + pCXXMemberCallExpr->getImplicitObjectArgument()->getStmtClassName()
"Should be calling OutputDevice method through RenderContext.",
pCXXMemberCallExpr->getLocStart())
<< pCXXMemberCallExpr->getSourceRange();
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index c937eae71faa..ced7ca53127f 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2423,34 +2423,21 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn)
::dbtools::throwGenericSQLException( sError, *this );
}
- bool bAlreadyDroped = false;
- try
+ pNewTable->construct();
+ // copy the data
+ copyData(pNewTable,pNewTable->m_pColumns->getCount());
+ // drop the old table
+ if(DropImpl())
{
- pNewTable->construct();
- // copy the data
- copyData(pNewTable,pNewTable->m_pColumns->getCount());
- // drop the old table
- if(DropImpl())
- {
- bAlreadyDroped = true;
- pNewTable->renameImpl(m_Name);
- // release the temp file
- }
- xHold = pNewTable = NULL;
-
- FileClose();
- construct();
- if(m_pColumns)
- m_pColumns->refresh();
+ pNewTable->renameImpl(m_Name);
+ // release the temp file
}
- catch(const SQLException&)
- {
- // here we know that the old table wasn't dropped before
- if(!bAlreadyDroped)
- xHold = pNewTable = NULL;
+ xHold = pNewTable = NULL;
- throw;
- }
+ FileClose();
+ construct();
+ if(m_pColumns)
+ m_pColumns->refresh();
}
void ODbaseTable::dropColumn(sal_Int32 _nPos)
diff --git a/framework/source/uifactory/menubarfactory.cxx b/framework/source/uifactory/menubarfactory.cxx
index 55afe317e5b6..cb29ca66acb9 100644
--- a/framework/source/uifactory/menubarfactory.cxx
+++ b/framework/source/uifactory/menubarfactory.cxx
@@ -124,7 +124,7 @@ void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier =
theModuleUIConfigurationManagerSupplier::get( _rxContext );
xCfgMgr = xModuleCfgSupplier->getUIConfigurationManager( aModuleIdentifier );
- bHasSettings = xCfgMgr->hasSettings( aResourceURL );
+ xCfgMgr->hasSettings( aResourceURL );
}
}
}
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index bf31bfdc57cc..bbb8304573fd 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -291,14 +291,12 @@ void ConvDicXMLRightTextContext_Impl::EndElement()
bool ConvDicXMLExport::Export()
{
- bool bRet = false;
-
uno::Reference< document::XExporter > xExporter( this );
uno::Reference< document::XFilter > xFilter( xExporter, UNO_QUERY );
uno::Sequence< beans::PropertyValue > aProps(0);
xFilter->filter( aProps ); // calls exportDoc implicitly
- return bRet = bSuccess;
+ return bSuccess;
}
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
index 27d831762aa8..e755f6849c1b 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -115,7 +115,7 @@ sal_Int32 PowerPointImport::getSchemeColor( sal_Int32 nToken ) const
{
pClrMapPtr = pMasterPersist->getClrMap();
if ( pClrMapPtr )
- bColorMapped = pClrMapPtr->getColorMap( nToken );
+ pClrMapPtr->getColorMap( nToken );
}
}
oox::drawingml::ClrSchemePtr pClrSchemePtr( mpActualSlidePersist->getClrScheme() );
diff --git a/sal/osl/unx/nlsupport.cxx b/sal/osl/unx/nlsupport.cxx
index 1fb6e027eee6..0f6d28c2f8c7 100644
--- a/sal/osl/unx/nlsupport.cxx
+++ b/sal/osl/unx/nlsupport.cxx
@@ -147,7 +147,6 @@ static char * _compose_locale( rtl_Locale * pLocale, char * buffer, size_t n )
if( offset + pVariant->length + 1 < n )
{
strcpy( buffer + offset, pVariant->buffer );
- offset += pVariant->length;
}
rtl_string_release( pVariant );
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 2e8ae003cd0f..c8bdc22dab18 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3438,7 +3438,7 @@ bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
if (aCell.mpFormula->IsValue())
{
nVal = aCell.mpFormula->GetValue();
- pVar->PutDouble(aCell.mpFormula->GetValue());
+ pVar->PutDouble( nVal );
}
else
pVar->PutString(aCell.mpFormula->GetString().getString());
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 4a2b4e8a124d..fd790c3c3e31 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -129,7 +129,7 @@ ScMyAddress ScAccessibleSpreadsheet::CalcScAddressFromRangeList(ScRangeList *pMa
return ScMyAddress(0,0,maActiveCell.Tab());
}
-bool ScAccessibleSpreadsheet::CalcScRangeDifferenceMax(ScRange *pSrc,ScRange *pDest,int nMax,VEC_MYADDR &vecRet,int &nSize)
+bool ScAccessibleSpreadsheet::CalcScRangeDifferenceMax(ScRange *pSrc, ScRange *pDest, int nMax, VEC_MYADDR &vecRet, int &nSize)
{
//Src Must be :Src > Dest
if (pDest->In(*pSrc))
@@ -147,7 +147,6 @@ bool ScAccessibleSpreadsheet::CalcScRangeDifferenceMax(ScRange *pSrc,ScRange *pD
}
else if(nCellCount > 0)
{
- nCellCount +=nSize;
for (sal_Int32 row = pDest->aStart.Row(); row <= pDest->aEnd.Row();++row)
{
for (sal_uInt16 col = pDest->aStart.Col(); col <= pDest->aEnd.Col();++col)
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index 2b05d3c12b3e..2821c202d0cf 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -360,7 +360,6 @@ void ScDBFunc::ToggleAutoFilter()
)->Execute() == RET_YES )
{
pDBData->SetHeader( true ); //! Undo ??
- bHeader = true;
}
}
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index a5042cdc59da..1457d9f20bc8 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -455,7 +455,6 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
SCCOL nHdlX = aAutoMarkPos.Col();
SCROW nHdlY = aAutoMarkPos.Row();
rDoc.ExtendMerge( nHdlX, nHdlY, nHdlX, nHdlY, nTab );
- bCurVis = ( nHdlX+1 >= nX1 && nHdlX <= nX2 && nHdlY+1 >= nY1 && nHdlY <= nY2 );
// left and top is unaffected
//! AutoFill-Anfasser alleine (ohne Cursor) zeichnen ???
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index cdd094cddc4f..33830602160f 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -383,7 +383,6 @@ bool SdDrawDocument::InsertBookmarkAsPage(
bool bMergeMasterPages,
bool bPreservePageNames)
{
- bool bOK = true;
bool bContinue = true;
bool bScaleObjects = false;
sal_uInt16 nReplacedStandardPages = 0;
@@ -416,8 +415,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
if (nSdPageCount==0 || nBMSdPageCount==0 || nMPageCount==0)
{
- bContinue = bOK = false;
- return bContinue;
+ return false;
}
// Store the size and some other properties of the first page and notes
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
index 06ac9c383441..7a052ad845cb 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
@@ -331,7 +331,6 @@ void ClientBox::DrawRow(vcl::RenderContext& rRenderContext, const Rectangle& rRe
aTitleWidth = nMaxTitleWidth - (aTextHeight / 3);
OUString aShortTitle = rRenderContext.GetEllipsisString(rEntry->m_pClientInfo->mName, aTitleWidth );
rRenderContext.DrawText(aPos, aShortTitle);
- aTitleWidth += (aTextHeight / 3);
}
else
rRenderContext.DrawText(aPos, rEntry->m_pClientInfo->mName);
diff --git a/setup_native/source/win32/wintools/makecab/makecab.c b/setup_native/source/win32/wintools/makecab/makecab.c
index 91cfa3891b46..4acdc9fc315d 100644
--- a/setup_native/source/win32/wintools/makecab/makecab.c
+++ b/setup_native/source/win32/wintools/makecab/makecab.c
@@ -295,7 +295,6 @@ int main(int argc, char *argv[])
CCAB ddfVars;
DDFSRCFILE *srcList = NULL;
DDFSRCFILE *srcListCurr = NULL;
- HFCI fci = NULL;
char * cmd = NULL;
unsigned int cmdSize = 0;
diff --git a/setup_native/source/win32/wintools/msidb/msidb.c b/setup_native/source/win32/wintools/msidb/msidb.c
index 2ad33478a2f9..ea1c5ba6c011 100644
--- a/setup_native/source/win32/wintools/msidb/msidb.c
+++ b/setup_native/source/win32/wintools/msidb/msidb.c
@@ -126,7 +126,7 @@ static BOOL msidbExportStorage(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR storageName)
r = MsiViewFetch(view, &rec);
if (r != ERROR_SUCCESS) return FALSE;
- if ((r = MsiRecordReadStream(rec, 2, 0, &dataLen)) != ERROR_SUCCESS)
+ if (MsiRecordReadStream(rec, 2, 0, &dataLen) != ERROR_SUCCESS)
{
return FALSE;
}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 2c1649427a23..ae51fb74004f 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3454,7 +3454,7 @@ bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< embed
}
uno::Reference< beans::XPropertySet > xProps( xSubStorage, uno::UNO_QUERY_THROW );
- bGotMediaType = ( xProps->getPropertyValue( aMediaTypePropName ) >>= aMediaType );
+ xProps->getPropertyValue( aMediaTypePropName ) >>= aMediaType;
}
// TODO/LATER: there should be a way to detect whether an object with such a MediaType can exist
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index d41ae370ad63..055d5f3e87a5 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -838,8 +838,8 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
case SID_SETUPPRINTER:
case SID_PRINTER_NAME:
{
- bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks;
- bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting();
+ bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks
+ && !Application::GetSettings().GetMiscSettings().GetDisablePrinting();
if ( bEnabled )
{
SfxPrinter *pPrinter = GetPrinter(false);
@@ -866,7 +866,6 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) );
}
}
- bEnabled = !pPrinter || !pPrinter->IsPrinting();
}
break;
}
diff --git a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx
index 537ca8d36ab1..a033978d2c5e 100644
--- a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx
+++ b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx
@@ -34,7 +34,6 @@
*/
std::wstring iso8601_date_to_local_date(const std::wstring& isoDate )
{
- const std::wstring CONST_SPACE(L" ");
::std::wstring ws8601DateTime(isoDate);
if ( ws8601DateTime.length() == 19 )
diff --git a/slideshow/source/engine/slide/targetpropertiescreator.cxx b/slideshow/source/engine/slide/targetpropertiescreator.cxx
index deef54f6720c..d1877c6c222d 100644
--- a/slideshow/source/engine/slide/targetpropertiescreator.cxx
+++ b/slideshow/source/engine/slide/targetpropertiescreator.cxx
@@ -251,8 +251,7 @@ namespace internal
// check whether we already have an entry for
// this target (we only take the first set
// effect for every shape)
- XShapeHash::const_iterator aIter;
- if( (aIter=mrShapeHash.find( aTarget )) != mrShapeHash.end() )
+ if( mrShapeHash.find( aTarget ) != mrShapeHash.end() )
break; // already an entry in existence for given XShape
// if this is an appear effect, hide shape
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 7acd1494f717..e7d904ee83be 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -565,7 +565,6 @@ static void deleteUserLink(const Reference < XRegistryKey >& xRootKey,
if (hasNoImplementations)
{
bClean = true;
- hasNoImplementations = false;
OUString path(xOldKey->getKeyName());
xOldKey->closeKey();
xRootKey->deleteKey(path);
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx
index b1baf3e903d7..45046d63f13f 100644
--- a/svtools/source/uno/unoevent.cxx
+++ b/svtools/source/uno/unoevent.cxx
@@ -246,7 +246,7 @@ void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny,
rAny <<= aSequence;
bRetValueOK = true;
break;
- }
+ }
case JAVASCRIPT:
default:
OSL_FAIL("not implemented");
@@ -268,7 +268,6 @@ void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny,
aSequence[0] = aKindValue;
rAny <<= aSequence;
- bRetValueOK = true;
}
}
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index a463eb8b5376..d94e2c7be190 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2080,8 +2080,6 @@ void CorrectCalloutArrows( MSO_SPT eSpType, sal_uInt32 nLineObjectCount, std::ve
case mso_sptAccentCallout3 :
case mso_sptAccentBorderCallout3 :
- bAccent = false;
- //fall-through
case mso_sptCallout3 :
case mso_sptBorderCallout3 :
{
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 1e74bdac46e2..1ad212baec7d 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -490,7 +490,6 @@ SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
sal_uInt16 nCompress = ( pCurrent->GetKanaComp() )[ nKanaIdx ];
pPos = pCurrent->GetPortion();
long nDecompress = 0;
- nKanaDiffSum = 0;
while( pPos )
{
@@ -505,7 +504,6 @@ SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
// check, if information is stored under other key
if ( !nMaxWidthDiff && pPos == pCurrent->GetFirstPortion() )
nMaxWidthDiff = GetInfo().GetMaxWidthDiff( pCurrent );
- nKanaDiffSum += nMaxWidthDiff;
pPos->Width( nMinWidth +
( ( 10000 - nCompress ) * nMaxWidthDiff ) / 10000 );
nDecompress += pPos->Width() - nMinWidth;
@@ -521,7 +519,6 @@ SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent )
if ( ++nKanaIdx < pCurrent->GetKanaComp().size() )
nCompress = ( pCurrent->GetKanaComp() )[ nKanaIdx ];
- nKanaDiffSum = 0;
nDecompress = 0;
}
pPos = pPos->GetPortion();
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 49664e5530bf..7948ccdf6472 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2851,7 +2851,6 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL)
}
if(!bLastWasText)
{
- bLastWasText = true;
SwFormToken aTemp(TOKEN_TEXT);
Control* pCtrl = InsertItem(aEmptyOUStr, aTemp);
if(!pSetActiveControl)
diff --git a/sw/source/ui/vba/vbarangehelper.cxx b/sw/source/ui/vba/vbarangehelper.cxx
index e4e1b92a6e9e..d5d5b70313be 100644
--- a/sw/source/ui/vba/vbarangehelper.cxx
+++ b/sw/source/ui/vba/vbarangehelper.cxx
@@ -124,7 +124,6 @@ uno::Reference< text::XTextCursor > SwVbaRangeHelper::initCursor( const uno::Ref
try
{
xTextCursor = rText->createTextCursor();
- bGotTextCursor = true;
}
catch (const uno::Exception& e)
{
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 2321dccdc567..bc86274004c7 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2018,11 +2018,9 @@ bool SwDBManager::GetColumnCnt(const OUString& rSourceName, const OUString& rTab
if ( nOldRow != static_cast<sal_Int32>(nAbsRecordId) )
bMove = lcl_MoveAbsolute(pFound, nAbsRecordId);
if(bMove)
- {
bRet = lcl_GetColumnCnt(pFound, rColumnName, nLanguage, rResult, pNumber);
- }
if ( nOldRow != static_cast<sal_Int32>(nAbsRecordId) )
- bMove = lcl_MoveAbsolute(pFound, nOldRow);
+ lcl_MoveAbsolute(pFound, nOldRow);
}
return bRet;
}
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 31315ec0f4ff..9a691adcf821 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -829,7 +829,7 @@ void SwWrtShell::ConnectObj( svt::EmbeddedObjectRef& xObj, const SwRect &rPrt,
{
SfxInPlaceClient* pCli = GetView().FindIPClient( xObj.GetObject(), &GetView().GetEditWin());
if ( !pCli )
- pCli = new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
+ new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
CalcAndSetScale( xObj, &rPrt, &rFrm );
}
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index d74cc7ced9ae..861b1750f945 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -1557,8 +1557,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
if ( bError )
{
- if ( !(bNetworkAccessAllowed
- = shouldAccessNetworkAfterException( aLastException )) )
+ if ( !shouldAccessNetworkAfterException( aLastException ) )
{
cancelCommandExecution( aLastException, xEnv );
// unreachable
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index b603a8e69b64..f188527a8a23 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -693,8 +693,7 @@ const OUString& SelectionManager::getString( Atom aAtom )
{
osl::MutexGuard aGuard(m_aMutex);
- std::unordered_map< Atom, OUString >::const_iterator it;
- if( ( it = m_aAtomToString.find( aAtom ) ) == m_aAtomToString.end() )
+ if( m_aAtomToString.find( aAtom ) == m_aAtomToString.end() )
{
static OUString aEmpty;
char* pAtom = m_pDisplay ? XGetAtomName( m_pDisplay, aAtom ) : NULL;
@@ -712,8 +711,7 @@ Atom SelectionManager::getAtom( const OUString& rString )
{
osl::MutexGuard aGuard(m_aMutex);
- std::unordered_map< OUString, Atom, OUStringHash >::const_iterator it;
- if( ( it = m_aStringToAtom.find( rString ) ) == m_aStringToAtom.end() )
+ if( m_aStringToAtom.find( rString ) == m_aStringToAtom.end() )
{
static Atom nNoDisplayAtoms = 1;
Atom aAtom = m_pDisplay ? XInternAtom( m_pDisplay, OUStringToOString( rString, RTL_TEXTENCODING_ISO_8859_1 ).getStr(), False ) : nNoDisplayAtoms++;
diff --git a/vcl/unx/generic/dtrans/X11_transferable.cxx b/vcl/unx/generic/dtrans/X11_transferable.cxx
index 092165a1e2e7..45a38cd1c8e9 100644
--- a/vcl/unx/generic/dtrans/X11_transferable.cxx
+++ b/vcl/unx/generic/dtrans/X11_transferable.cxx
@@ -76,7 +76,7 @@ Sequence< DataFlavor > SAL_CALL X11Transferable::getTransferDataFlavors()
Sequence< DataFlavor > aFlavorList;
bool bSuccess = m_rManager.getPasteDataTypes( m_aSelection ? m_aSelection : XA_PRIMARY, aFlavorList );
if( ! bSuccess && m_aSelection == 0 )
- bSuccess = m_rManager.getPasteDataTypes( m_rManager.getAtom( OUString("CLIPBOARD") ), aFlavorList );
+ m_rManager.getPasteDataTypes( m_rManager.getAtom( OUString("CLIPBOARD") ), aFlavorList );
return aFlavorList;
}
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 4a658cb06928..e39e7682efaf 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -475,7 +475,7 @@ void GtkSalFrame::doKeyCallback( guint state,
if( bDown )
{
bool bHandled = CallCallback( SALEVENT_KEYINPUT, &aEvent );
- // #i46889# copy AlternatKeyCode handling from generic plugin
+ // #i46889# copy AlternateKeyCode handling from generic plugin
if( ! bHandled )
{
KeyAlternate aAlternate = GetAlternateKeyCode( aEvent.mnCode );
@@ -484,7 +484,7 @@ void GtkSalFrame::doKeyCallback( guint state,
aEvent.mnCode = aAlternate.nKeyCode;
if( aAlternate.nCharCode )
aEvent.mnCharCode = aAlternate.nCharCode;
- bHandled = CallCallback( SALEVENT_KEYINPUT, &aEvent );
+ CallCallback( SALEVENT_KEYINPUT, &aEvent );
}
}
if( bSendRelease && ! aDel.isDeleted() )
diff --git a/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx b/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
index b96319f35f7c..874a67e2ebb1 100644
--- a/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
+++ b/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
@@ -37,7 +37,6 @@ RoleFiller::RoleFiller()
RoleFiller::~RoleFiller()
{
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx
index 482857ffcfcc..4a8de1db6e2d 100644
--- a/xmloff/source/style/numehelp.cxx
+++ b/xmloff/source/style/numehelp.cxx
@@ -218,7 +218,6 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes(SvXMLExport& rXMLExp
if (!bWasSetTypeAttribute)
{
rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_FLOAT);
- bWasSetTypeAttribute = true;
if (bExportValue)
{
OUString sValue( ::rtl::math::doubleToUString( rValue,
@@ -502,7 +501,6 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes(
if (!bWasSetTypeAttribute)
{
pExport->AddAttribute(sAttrValType, XML_FLOAT);
- bWasSetTypeAttribute = true;
if (bExportValue)
{
OUString sValue( ::rtl::math::doubleToUString( rValue,