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

Eike Rathke erack at redhat.com
Wed Jul 2 15:10:29 PDT 2014


 svl/source/numbers/zforfind.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 397362d8532d7b0abe38f2024dd2cefe2482d6a3
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Jul 3 00:08:51 2014 +0200

    work around nonsense -Werror=maybe-uninitialized, fdo#80166 follow-up
    
    Change-Id: I0f9cf74550e43d174bf6ac75e70c51ab7f51ccf8

diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index c2946c3..993b712 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -1210,6 +1210,13 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt )
                             nMaxLen = 2;
                             nMaxVal = 31;
                             break;
+                        default:
+                            // This merely exists against
+                            // -Werror=maybe-uninitialized, which is nonsense
+                            // after the (c == 'M' || c == 'D') check above,
+                            // but ...
+                            nMaxLen = 2;
+                            nMaxVal = 31;
                     }
                     bOk = (sStrArray[nNext].getLength() <= nMaxLen);
                     if (bOk)


More information about the Libreoffice-commits mailing list