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

Stephan Bergmann sbergman at redhat.com
Thu Aug 27 06:06:20 PDT 2015


 i18npool/source/localedata/LocaleNode.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 186c82e81f3d75be0971ff1b561172a182e46a97
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Aug 27 15:02:04 2015 +0200

    Actually process the escaped character
    
    ...was like this ever since it got introduced in
    b75958473503f7eca096b8843e57a031bbabe0ab "implemented date acceptance patterns
    API."  Found with clang-tidy's clang-analyzer-deadcode.DeadStores.
    
    Change-Id: Ib1572ca9f254e3e835dbbe088f6a48c24dbd8235

diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 4a41aa5..7db424c 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -1101,7 +1101,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
                     break;
                 case '\\':
                     cChar = sTheDateEditFormat.iterateCodePoints( &nIndex);
-                    break;
+                    goto handleDefault;
                 case '-':
                 case '.':
                 case '/':
@@ -1114,6 +1114,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
                     cDateSep2 = cChar;
                     // fallthru
                 default:
+                handleDefault:
                     if (!cDateSep)
                         cDateSep = cChar;
                     if (!cDateSep2)


More information about the Libreoffice-commits mailing list