summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-16 11:28:54 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-16 11:29:15 +0200
commit6e92279a6e2a52d3e609d2f4690c3d5ef1a21059 (patch)
treee19fcdaa1ec93cccac1ba16e90da94e01992838b /sw
parent7d34479c74eddaad90fc491210a7cd6eddcc4286 (diff)
-Werror,-Wsometimes-uninitialized
Change-Id: I24baf1f0e559c92dfac1337cd70feb737155fe3b
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/fields/dbfld.cxx6
1 files changed, 3 insertions, 3 deletions
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 );