[Libreoffice-commits] core.git: scaddins/source

Michael Stahl mstahl at redhat.com
Thu Mar 27 05:20:44 PDT 2014


 scaddins/source/analysis/analysishelper.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 88a822a2d8c40d345cf5060a70b6b132221ef651
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Mar 27 13:15:06 2014 +0100

    scaddins: workaround spurious MSVC warning C4701
    
    Change-Id: I5b184a552b258e922d594cabd52c9f2bae3bb2b1

diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index bf13aad..5751869 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -600,6 +600,12 @@ double GetYearFrac( sal_Int32 nNullDate, sal_Int32 nStartDate, sal_Int32 nEndDat
         case 3:         // 3=exact/365
             nDaysInYear = 365;
             break;
+#ifdef _MSC_VER
+        // Coverity complains this is dead code, but MSVC thinks nDaysInYear
+        // is uninitialized if it's missing.
+        default:
+            throw lang::IllegalArgumentException();
+#endif
     }
 
     return double( nDayDiff ) / nDaysInYear;


More information about the Libreoffice-commits mailing list