From 6e92279a6e2a52d3e609d2f4690c3d5ef1a21059 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 16 Sep 2014 11:28:54 +0200 Subject: -Werror,-Wsometimes-uninitialized Change-Id: I24baf1f0e559c92dfac1337cd70feb737155fe3b --- sw/source/core/fields/dbfld.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw') diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index a7f9380118a6..02470082c418 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -333,9 +333,9 @@ void SwDBField::Evaluate() SetFormat( nFmt = pMgr->GetColumnFmt( aTmpData.sDataSource, aTmpData.sCommand, aColNm, pDocFormatter, GetLanguage() )); - sal_Int32 nColumnType; - if( DBL_MAX != nValue ) - nColumnType = pMgr->GetColumnType(aTmpData.sDataSource, aTmpData.sCommand, aColNm); + sal_Int32 nColumnType = nValue == DBL_MAX + ? 0 + : pMgr->GetColumnType(aTmpData.sDataSource, aTmpData.sCommand, aColNm); bValidValue = FormatValue( pDocFormatter, aContent, nFmt, nValue, nColumnType, this ); -- cgit