Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kcodecs for openSUSE:Factory checked 
in at 2022-02-24 18:19:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kcodecs (Old)
 and      /work/SRC/openSUSE:Factory/.kcodecs.new.1958 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kcodecs"

Thu Feb 24 18:19:20 2022 rev:100 rq:954232 version:5.91.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kcodecs/kcodecs.changes  2022-01-11 
21:18:24.984922820 +0100
+++ /work/SRC/openSUSE:Factory/.kcodecs.new.1958/kcodecs.changes        
2022-02-24 18:21:26.082690660 +0100
@@ -1,0 +2,10 @@
+Sun Feb  6 10:16:50 UTC 2022 - Christophe Giboudeaux <[email protected]>
+
+- Update to 5.91.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/frameworks/5/5.91.0
+- Changes since 5.90.0:
+  * Add CI qt6 support
+
+-------------------------------------------------------------------

Old:
----
  kcodecs-5.90.0.tar.xz
  kcodecs-5.90.0.tar.xz.sig

New:
----
  kcodecs-5.91.0.tar.xz
  kcodecs-5.91.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kcodecs.spec ++++++
--- /var/tmp/diff_new_pack.BCFvIn/_old  2022-02-24 18:21:26.702690494 +0100
+++ /var/tmp/diff_new_pack.BCFvIn/_new  2022-02-24 18:21:26.706690493 +0100
@@ -17,14 +17,14 @@
 
 
 %define lname   libKF5Codecs5
-%define _tar_path 5.90
+%define _tar_path 5.91
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
 %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 %bcond_without released
 Name:           kcodecs
-Version:        5.90.0
+Version:        5.91.0
 Release:        0
 Summary:        Method collection to manipulate strings using various encodings
 License:        LGPL-2.1-or-later


++++++ kcodecs-5.90.0.tar.xz -> kcodecs-5.91.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/.gitlab-ci.yml 
new/kcodecs-5.91.0/.gitlab-ci.yml
--- old/kcodecs-5.90.0/.gitlab-ci.yml   2022-01-01 13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/.gitlab-ci.yml   2022-02-05 22:19:28.000000000 +0100
@@ -5,3 +5,4 @@
   - 
https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
   - 
https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android.yml
   - 
https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
+  - 
https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/CMakeLists.txt 
new/kcodecs-5.91.0/CMakeLists.txt
--- old/kcodecs-5.90.0/CMakeLists.txt   2022-01-01 13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/CMakeLists.txt   2022-02-05 22:19:28.000000000 +0100
@@ -1,10 +1,10 @@
 cmake_minimum_required(VERSION 3.16)
 
-set(KF_VERSION "5.90.0") # handled by release scripts
+set(KF_VERSION "5.91.0") # handled by release scripts
 project(KCodecs VERSION ${KF_VERSION})
 
 include(FeatureSummary)
-find_package(ECM 5.90.0  NO_MODULE)
+find_package(ECM 5.91.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL "https://commits.kde.org/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
@@ -79,7 +79,7 @@
 install(EXPORT KF5CodecsTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE 
KF5CodecsTargets.cmake NAMESPACE KF5:: )
 
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kcodecs_version.h
-        DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF} COMPONENT Devel )
+        DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KCodecs COMPONENT Devel)
 
 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/autotests/kcharsetstest.cpp 
new/kcodecs-5.91.0/autotests/kcharsetstest.cpp
--- old/kcodecs-5.90.0/autotests/kcharsetstest.cpp      2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/autotests/kcharsetstest.cpp      2022-02-05 
22:19:28.000000000 +0100
@@ -14,12 +14,9 @@
 
 static bool encodingNameHasADescription(const QString &encodingName, const 
QStringList &descriptions)
 {
-    for (const QString &description : descriptions) {
-        if (description.contains(encodingName)) {
-            return true;
-        }
-    }
-    return false;
+    return std::any_of(descriptions.cbegin(), descriptions.cend(), 
[&encodingName](const QString &description) {
+        return description.contains(encodingName);
+    });
 }
 
 void KCharsetsTest::testSingleton()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/autotests/kusasciitextcodectest.cpp 
new/kcodecs-5.91.0/autotests/kusasciitextcodectest.cpp
--- old/kcodecs-5.90.0/autotests/kusasciitextcodectest.cpp      2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/autotests/kusasciitextcodectest.cpp      2022-02-05 
22:19:28.000000000 +0100
@@ -45,12 +45,14 @@
 
     QTextCodec::ConverterState failConverterState;
 
-    const QByteArray failEncoded8Bit = 
qtCodec->fromUnicode(failUnicodeText.constData(), failUnicodeText.length(), 
&failConverterState);
+    // Only interested in what failConverterState will be changed to
+    qtCodec->fromUnicode(failUnicodeText.constData(), 
failUnicodeText.length(), &failConverterState);
+
     // Bug seems fixed in Qt6
 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+    // confirm the broken result 0, which rather should be 1
     QCOMPARE(failConverterState.invalidChars, 1);
 #else
-    // confirm the broken result 0, which rather should be 1
     QCOMPARE(failConverterState.invalidChars, 0);
 #endif
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/po/zh_CN/kcodecs5_qt.po 
new/kcodecs-5.91.0/po/zh_CN/kcodecs5_qt.po
--- old/kcodecs-5.90.0/po/zh_CN/kcodecs5_qt.po  2022-01-01 13:26:32.000000000 
+0100
+++ new/kcodecs-5.91.0/po/zh_CN/kcodecs5_qt.po  2022-02-05 22:19:28.000000000 
+0100
@@ -13,7 +13,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: kdeorg\n"
-"PO-Revision-Date: 2021-12-22 14:05\n"
+"PO-Revision-Date: 2022-01-08 15:22\n"
 "Language-Team: Chinese Simplified\n"
 "Language: zh_CN\n"
 "MIME-Version: 1.0\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/kcharsets.cpp 
new/kcodecs-5.91.0/src/kcharsets.cpp
--- old/kcodecs-5.90.0/src/kcharsets.cpp        2022-01-01 13:26:32.000000000 
+0100
+++ new/kcodecs-5.91.0/src/kcharsets.cpp        2022-02-05 22:19:28.000000000 
+0100
@@ -476,7 +476,7 @@
 class KCharsetsPrivate
 {
 public:
-    KCharsetsPrivate(KCharsets *_kc)
+    explicit KCharsetsPrivate(KCharsets *_kc)
         : usAsciiTextCodec{new KUsAsciiTextCodec}
     {
         kc = _kc;
@@ -809,7 +809,6 @@
             d->codecForNameDict.insert(n, codec);
             return codec;
         }
-        changed = false;
     }
 
     // these codecs are built into Qt, but the name given for the codec is 
different,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/kcodecs.cpp 
new/kcodecs-5.91.0/src/kcodecs.cpp
--- old/kcodecs-5.90.0/src/kcodecs.cpp  2022-01-01 13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/kcodecs.cpp  2022-02-05 22:19:28.000000000 +0100
@@ -52,10 +52,11 @@
 
 QByteArray cachedCharset(const QByteArray &name)
 {
-    for (const QByteArray &charset : qAsConst(charsetCache)) {
-        if (qstricmp(name.data(), charset.data()) == 0) {
-            return charset;
-        }
+    auto it = std::find_if(charsetCache.cbegin(), charsetCache.cend(), 
[&name](const QByteArray &charset) {
+        return qstricmp(name.data(), charset.data()) == 0;
+    });
+    if (it != charsetCache.cend()) {
+        return *it;
     }
 
     charsetCache.append(name.toUpper());
@@ -510,10 +511,9 @@
         if (useQEncoding) {
             result += "?Q?";
 
-            char c;
             char hexcode; // "Q"-encoding implementation described in RFC 2047
             for (int i = start; i < end; i++) {
-                c = encoded8Bit[i];
+                const char c = encoded8Bit[i];
                 if (c == ' ') { // make the result readable with not 
MIME-capable readers
                     result += '_';
                 } else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/kcodecs_p.h 
new/kcodecs-5.91.0/src/kcodecs_p.h
--- old/kcodecs-5.90.0/src/kcodecs_p.h  2022-01-01 13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/kcodecs_p.h  2022-02-05 22:19:28.000000000 +0100
@@ -14,7 +14,7 @@
 class EncoderPrivate
 {
 public:
-    EncoderPrivate(Codec::NewlineType newline);
+    explicit EncoderPrivate(Codec::NewlineType newline);
 
     /**
       An output buffer to simplify some codecs.
@@ -29,7 +29,7 @@
 class DecoderPrivate
 {
 public:
-    DecoderPrivate(Codec::NewlineType newline);
+    explicit DecoderPrivate(Codec::NewlineType newline);
 
     const Codec::NewlineType newline;
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/kcodecsidentity.cpp 
new/kcodecs-5.91.0/src/kcodecsidentity.cpp
--- old/kcodecs-5.90.0/src/kcodecsidentity.cpp  2022-01-01 13:26:32.000000000 
+0100
+++ new/kcodecs-5.91.0/src/kcodecsidentity.cpp  2022-02-05 22:19:28.000000000 
+0100
@@ -30,7 +30,7 @@
 {
 protected:
     friend class KCodecs::IdentityCodec;
-    IdentityEnDecoder(Codec::NewlineType newline)
+    explicit IdentityEnDecoder(Codec::NewlineType newline)
         : Encoder(Codec::NewlineLF)
     {
         if (newline == Codec::NewlineCRLF) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/kemailaddress.cpp 
new/kcodecs-5.91.0/src/kemailaddress.cpp
--- old/kcodecs-5.90.0/src/kemailaddress.cpp    2022-01-01 13:26:32.000000000 
+0100
+++ new/kcodecs-5.91.0/src/kemailaddress.cpp    2022-02-05 22:19:28.000000000 
+0100
@@ -371,7 +371,7 @@
                     } else if (index == strlen - 1) {
                         return MissingDomainPart;
                     }
-                } else if (inQuotedString) {
+                } else {
                     --atCount;
                     if (atCount == 1) {
                         tooManyAtsFlag = false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/kencodingprober.cpp 
new/kcodecs-5.91.0/src/kencodingprober.cpp
--- old/kcodecs-5.90.0/src/kencodingprober.cpp  2022-01-01 13:26:32.000000000 
+0100
+++ new/kcodecs-5.91.0/src/kencodingprober.cpp  2022-02-05 22:19:28.000000000 
+0100
@@ -22,28 +22,28 @@
 {
 public:
     KEncodingProberPrivate()
-        : prober(nullptr)
+        : mProber(nullptr)
         , mStart(true)
     {
     }
     ~KEncodingProberPrivate()
     {
-        delete prober;
+        delete mProber;
     }
     void setProberType(KEncodingProber::ProberType pType)
     {
-        proberType = pType;
+        mProberType = pType;
         /* handle multi-byte encodings carefully , because they're hard to 
detect,
          *   and have to use some Stastics methods.
          * for single-byte encodings (most western encodings), 
nsSBCSGroupProber is ok,
          *   because encoding state machine can detect many such encodings.
          */
 
-        delete prober;
+        delete mProber;
 
-        switch (proberType) {
+        switch (mProberType) {
         case KEncodingProber::None:
-            prober = nullptr;
+            mProber = nullptr;
             break;
         case KEncodingProber::Arabic:
         case KEncodingProber::Baltic:
@@ -57,26 +57,26 @@
         case KEncodingProber::Thai:
         case KEncodingProber::Turkish:
         case KEncodingProber::WesternEuropean:
-            prober = new kencodingprober::nsSBCSGroupProber();
+            mProber = new kencodingprober::nsSBCSGroupProber();
             break;
         case KEncodingProber::ChineseSimplified:
         case KEncodingProber::ChineseTraditional:
-            prober = new kencodingprober::ChineseGroupProber();
+            mProber = new kencodingprober::ChineseGroupProber();
             break;
         case KEncodingProber::Japanese:
-            prober = new kencodingprober::JapaneseGroupProber();
+            mProber = new kencodingprober::JapaneseGroupProber();
             break;
         case KEncodingProber::Korean:
-            prober = new kencodingprober::nsMBCSGroupProber();
+            mProber = new kencodingprober::nsMBCSGroupProber();
             break;
         case KEncodingProber::Unicode:
-            prober = new kencodingprober::UnicodeGroupProber();
+            mProber = new kencodingprober::UnicodeGroupProber();
             break;
         case KEncodingProber::Universal:
-            prober = new kencodingprober::nsUniversalDetector();
+            mProber = new kencodingprober::nsUniversalDetector();
             break;
         default:
-            prober = nullptr;
+            mProber = nullptr;
         }
     }
     void unicodeTest(const char *aBuf, int aLen)
@@ -89,49 +89,49 @@
                     if (('\xBB' == aBuf[1]) && ('\xBF' == aBuf[2]))
                     // EF BB BF  UTF-8 encoded BOM
                     {
-                        proberState = KEncodingProber::FoundIt;
+                        mProberState = KEncodingProber::FoundIt;
                     }
                     break;
                 case '\xFE':
                     if (('\xFF' == aBuf[1]) && ('\x00' == aBuf[2]) && ('\x00' 
== aBuf[3]))
                     // FE FF 00 00  UCS-4, unusual octet order BOM (3412)
                     {
-                        proberState = KEncodingProber::FoundIt;
+                        mProberState = KEncodingProber::FoundIt;
                     } else if ('\xFF' == aBuf[1])
                     // FE FF  UTF-16, big endian BOM
                     {
-                        proberState = KEncodingProber::FoundIt;
+                        mProberState = KEncodingProber::FoundIt;
                     }
                     break;
                 case '\x00':
                     if (('\x00' == aBuf[1]) && ('\xFE' == aBuf[2]) && ('\xFF' 
== aBuf[3]))
                     // 00 00 FE FF  UTF-32, big-endian BOM
                     {
-                        proberState = KEncodingProber::FoundIt;
+                        mProberState = KEncodingProber::FoundIt;
                     } else if (('\x00' == aBuf[1]) && ('\xFF' == aBuf[2]) && 
('\xFE' == aBuf[3]))
                     // 00 00 FF FE  UCS-4, unusual octet order BOM (2143)
                     {
-                        proberState = KEncodingProber::FoundIt;
+                        mProberState = KEncodingProber::FoundIt;
                     }
                     break;
                 case '\xFF':
                     if (('\xFE' == aBuf[1]) && ('\x00' == aBuf[2]) && ('\x00' 
== aBuf[3]))
                     // FF FE 00 00  UTF-32, little-endian BOM
                     {
-                        proberState = KEncodingProber::FoundIt;
+                        mProberState = KEncodingProber::FoundIt;
                     } else if ('\xFE' == aBuf[1])
                     // FF FE  UTF-16, little endian BOM
                     {
-                        proberState = KEncodingProber::FoundIt;
+                        mProberState = KEncodingProber::FoundIt;
                     }
                     break;
                 } // switch
             }
         }
     }
-    KEncodingProber::ProberType proberType;
-    KEncodingProber::ProberState proberState;
-    kencodingprober::nsCharSetProber *prober;
+    KEncodingProber::ProberType mProberType;
+    KEncodingProber::ProberState mProberState;
+    kencodingprober::nsCharSetProber *mProber;
     bool mStart;
 };
 
@@ -145,7 +145,7 @@
 
 void KEncodingProber::reset()
 {
-    d->proberState = KEncodingProber::Probing;
+    d->mProberState = KEncodingProber::Probing;
     d->mStart = true;
 }
 
@@ -156,61 +156,61 @@
 
 KEncodingProber::ProberState KEncodingProber::feed(const char *data, int len)
 {
-    if (!d->prober) {
-        return d->proberState;
+    if (!d->mProber) {
+        return d->mProberState;
     }
-    if (d->proberState == Probing) {
+    if (d->mProberState == Probing) {
         if (d->mStart) {
             d->unicodeTest(data, len);
-            if (d->proberState == FoundIt) {
-                return d->proberState;
+            if (d->mProberState == FoundIt) {
+                return d->mProberState;
             }
         }
-        d->prober->HandleData(data, len);
-        switch (d->prober->GetState()) {
+        d->mProber->HandleData(data, len);
+        switch (d->mProber->GetState()) {
         case kencodingprober::eNotMe:
-            d->proberState = NotMe;
+            d->mProberState = NotMe;
             break;
         case kencodingprober::eFoundIt:
-            d->proberState = FoundIt;
+            d->mProberState = FoundIt;
             break;
         default:
-            d->proberState = Probing;
+            d->mProberState = Probing;
             break;
         }
     }
 #ifdef DEBUG_PROBE
-    d->prober->DumpStatus();
+    d->mProber->DumpStatus();
 #endif
-    return d->proberState;
+    return d->mProberState;
 }
 
 KEncodingProber::ProberState KEncodingProber::state() const
 {
-    return d->proberState;
+    return d->mProberState;
 }
 
 QByteArray KEncodingProber::encoding() const
 {
-    if (!d->prober) {
+    if (!d->mProber) {
         return QByteArray("UTF-8");
     }
 
-    return QByteArray(d->prober->GetCharSetName());
+    return QByteArray(d->mProber->GetCharSetName());
 }
 
 float KEncodingProber::confidence() const
 {
-    if (!d->prober) {
+    if (!d->mProber) {
         return 0.0;
     }
 
-    return d->prober->GetConfidence();
+    return d->mProber->GetConfidence();
 }
 
 KEncodingProber::ProberType KEncodingProber::proberType() const
 {
-    return d->proberType;
+    return d->mProberType;
 }
 
 void KEncodingProber::setProberType(KEncodingProber::ProberType proberType)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/CharDistribution.cpp 
new/kcodecs-5.91.0/src/probers/CharDistribution.cpp
--- old/kcodecs-5.90.0/src/probers/CharDistribution.cpp 2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/CharDistribution.cpp 2022-02-05 
22:19:28.000000000 +0100
@@ -20,7 +20,7 @@
 float CharDistributionAnalysis::GetConfidence()
 {
     // if we didn't receive any character in our consideration range, return 
negative answer
-    if (mTotalChars <= 0) {
+    if (mTotalChars == 0) {
         return SURE_NO;
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/ChineseGroupProber.cpp 
new/kcodecs-5.91.0/src/probers/ChineseGroupProber.cpp
--- old/kcodecs-5.90.0/src/probers/ChineseGroupProber.cpp       2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/ChineseGroupProber.cpp       2022-02-05 
22:19:28.000000000 +0100
@@ -103,8 +103,8 @@
             break;
         } else if (st == eNotMe) {
             mIsActive[i] = false;
-            mActiveNum--;
-            if (mActiveNum <= 0) {
+            --mActiveNum;
+            if (mActiveNum == 0) {
                 mState = eNotMe;
                 break;
             }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/JapaneseGroupProber.cpp 
new/kcodecs-5.91.0/src/probers/JapaneseGroupProber.cpp
--- old/kcodecs-5.90.0/src/probers/JapaneseGroupProber.cpp      2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/JapaneseGroupProber.cpp      2022-02-05 
22:19:28.000000000 +0100
@@ -99,8 +99,8 @@
             break;
         } else if (st == eNotMe) {
             mIsActive[i] = false;
-            mActiveNum--;
-            if (mActiveNum <= 0) {
+            --mActiveNum;
+            if (mActiveNum == 0) {
                 mState = eNotMe;
                 break;
             }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/JpCntx.cpp 
new/kcodecs-5.91.0/src/probers/JpCntx.cpp
--- old/kcodecs-5.90.0/src/probers/JpCntx.cpp   2022-01-01 13:26:32.000000000 
+0100
+++ new/kcodecs-5.91.0/src/probers/JpCntx.cpp   2022-02-05 22:19:28.000000000 
+0100
@@ -348,10 +348,6 @@
 
 void JapaneseContextAnalysis::HandleData(const char *aBuf, unsigned int aLen)
 {
-    unsigned int charLen;
-    int order;
-    unsigned int i;
-
     if (mDone) {
         return;
     }
@@ -362,8 +358,9 @@
     // We can choose to record those bytes as well and analyze the character 
once it
     // is complete, but since a character will not make much difference, by 
simply skipping
     // this character will simply our logic and improve performance.
-    for (i = mNeedToSkipCharNum; i < aLen;) {
-        order = GetOrder(aBuf + i, &charLen);
+    for (unsigned int i = mNeedToSkipCharNum; i < aLen;) {
+        unsigned int charLen;
+        const int order = GetOrder(aBuf + i, &charLen);
         i += charLen;
         if (i > aLen) {
             mNeedToSkipCharNum = i - aLen;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/UnicodeGroupProber.cpp 
new/kcodecs-5.91.0/src/probers/UnicodeGroupProber.cpp
--- old/kcodecs-5.90.0/src/probers/UnicodeGroupProber.cpp       2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/UnicodeGroupProber.cpp       2022-02-05 
22:19:28.000000000 +0100
@@ -43,9 +43,8 @@
     nsSMState codingState;
     static bool disableUTF16LE = false;
     static bool disableUTF16BE = false;
-    double weight_zero;
 
-    if (mActiveSM <= 0 || aLen < 2) {
+    if (mActiveSM == 0 || aLen < 2) {
         mState = eNotMe;
         return mState;
     }
@@ -60,7 +59,7 @@
         for (uint i = 0; i < 5; i++) {
             counts[i] = std::count(aBuf, aBuf + aLen, char(i));
         }
-        weight_zero = (2.0 * (counts[0] + counts[1] + counts[2] + counts[3] + 
counts[4]) + weight_BOM) / aLen;
+        const double weight_zero = (2.0 * (counts[0] + counts[1] + counts[2] + 
counts[3] + counts[4]) + weight_BOM) / aLen;
         if (weight_zero < log(1.4142)) {
             disableUTF16LE = true;
             disableUTF16BE = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/nsBig5Prober.cpp 
new/kcodecs-5.91.0/src/probers/nsBig5Prober.cpp
--- old/kcodecs-5.90.0/src/probers/nsBig5Prober.cpp     2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/nsBig5Prober.cpp     2022-02-05 
22:19:28.000000000 +0100
@@ -21,10 +21,8 @@
         return mState;
     }
 
-    nsSMState codingState;
-
     for (unsigned int i = 0; i < aLen; i++) {
-        codingState = mCodingSM->NextState(aBuf[i]);
+        const nsSMState codingState = mCodingSM->NextState(aBuf[i]);
         if (codingState == eError) {
             mState = eNotMe;
             break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/nsEUCJPProber.cpp 
new/kcodecs-5.91.0/src/probers/nsEUCJPProber.cpp
--- old/kcodecs-5.90.0/src/probers/nsEUCJPProber.cpp    2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/nsEUCJPProber.cpp    2022-02-05 
22:19:28.000000000 +0100
@@ -27,10 +27,8 @@
         return mState;
     }
 
-    nsSMState codingState;
-
     for (unsigned int i = 0; i < aLen; i++) {
-        codingState = mCodingSM->NextState(aBuf[i]);
+        const nsSMState codingState = mCodingSM->NextState(aBuf[i]);
         if (codingState == eError) {
             mState = eNotMe;
             break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/nsEUCKRProber.cpp 
new/kcodecs-5.91.0/src/probers/nsEUCKRProber.cpp
--- old/kcodecs-5.90.0/src/probers/nsEUCKRProber.cpp    2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/nsEUCKRProber.cpp    2022-02-05 
22:19:28.000000000 +0100
@@ -22,10 +22,8 @@
         return mState;
     }
 
-    nsSMState codingState;
-
     for (unsigned int i = 0; i < aLen; i++) {
-        codingState = mCodingSM->NextState(aBuf[i]);
+        const nsSMState codingState = mCodingSM->NextState(aBuf[i]);
         if (codingState == eError) {
             mState = eNotMe;
             break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/nsGB2312Prober.cpp 
new/kcodecs-5.91.0/src/probers/nsGB2312Prober.cpp
--- old/kcodecs-5.90.0/src/probers/nsGB2312Prober.cpp   2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/nsGB2312Prober.cpp   2022-02-05 
22:19:28.000000000 +0100
@@ -27,10 +27,8 @@
         return mState;
     }
 
-    nsSMState codingState;
-
     for (unsigned int i = 0; i < aLen; i++) {
-        codingState = mCodingSM->NextState(aBuf[i]);
+        const nsSMState codingState = mCodingSM->NextState(aBuf[i]);
         if (codingState == eError) {
             mState = eNotMe;
             break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/nsLatin1Prober.cpp 
new/kcodecs-5.91.0/src/probers/nsLatin1Prober.cpp
--- old/kcodecs-5.90.0/src/probers/nsLatin1Prober.cpp   2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/nsLatin1Prober.cpp   2022-02-05 
22:19:28.000000000 +0100
@@ -91,11 +91,9 @@
         newLen1 = aLen;
     }
 
-    unsigned char charClass;
-    unsigned char freq;
     for (unsigned int i = 0; i < newLen1; i++) {
-        charClass = Latin1_CharToClass[(unsigned char)newBuf1[i]];
-        freq = Latin1ClassModel[mLastCharClass * CLASS_NUM + charClass];
+        const unsigned char charClass = Latin1_CharToClass[(unsigned 
char)newBuf1[i]];
+        const unsigned char freq = Latin1ClassModel[mLastCharClass * CLASS_NUM 
+ charClass];
         if (freq == 0) {
             mState = eNotMe;
             break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/nsMBCSGroupProber.cpp 
new/kcodecs-5.91.0/src/probers/nsMBCSGroupProber.cpp
--- old/kcodecs-5.90.0/src/probers/nsMBCSGroupProber.cpp        2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/nsMBCSGroupProber.cpp        2022-02-05 
22:19:28.000000000 +0100
@@ -106,7 +106,7 @@
         } else if (st == eNotMe) {
             mIsActive[i] = false;
             mActiveNum--;
-            if (mActiveNum <= 0) {
+            if (mActiveNum == 0) {
                 mState = eNotMe;
                 break;
             }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/nsSBCSGroupProber.cpp 
new/kcodecs-5.91.0/src/probers/nsSBCSGroupProber.cpp
--- old/kcodecs-5.90.0/src/probers/nsSBCSGroupProber.cpp        2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/nsSBCSGroupProber.cpp        2022-02-05 
22:19:28.000000000 +0100
@@ -125,7 +125,7 @@
         } else if (st == eNotMe) {
             mIsActive[i] = false;
             mActiveNum--;
-            if (mActiveNum <= 0) {
+            if (mActiveNum == 0) {
                 mState = eNotMe;
                 break;
             }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/nsSBCharSetProber.cpp 
new/kcodecs-5.91.0/src/probers/nsSBCharSetProber.cpp
--- old/kcodecs-5.90.0/src/probers/nsSBCharSetProber.cpp        2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/nsSBCharSetProber.cpp        2022-02-05 
22:19:28.000000000 +0100
@@ -12,10 +12,8 @@
 {
 nsProbingState nsSingleByteCharSetProber::HandleData(const char *aBuf, 
unsigned int aLen)
 {
-    unsigned char order;
-
     for (unsigned int i = 0; i < aLen; i++) {
-        order = mModel->charToOrderMap[(unsigned char)aBuf[i]];
+        const unsigned char order = mModel->charToOrderMap[(unsigned 
char)aBuf[i]];
 
         if (order < SYMBOL_CAT_ORDER) {
             mTotalChar++;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/nsSBCharSetProber.h 
new/kcodecs-5.91.0/src/probers/nsSBCharSetProber.h
--- old/kcodecs-5.90.0/src/probers/nsSBCharSetProber.h  2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/nsSBCharSetProber.h  2022-02-05 
22:19:28.000000000 +0100
@@ -31,7 +31,7 @@
 class KCODECS_NO_EXPORT nsSingleByteCharSetProber : public nsCharSetProber
 {
 public:
-    nsSingleByteCharSetProber(const SequenceModel *model)
+    explicit nsSingleByteCharSetProber(const SequenceModel *model)
         : mModel(model)
         , mReversed(false)
         , mNameProber(nullptr)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.90.0/src/probers/nsSJISProber.cpp 
new/kcodecs-5.91.0/src/probers/nsSJISProber.cpp
--- old/kcodecs-5.90.0/src/probers/nsSJISProber.cpp     2022-01-01 
13:26:32.000000000 +0100
+++ new/kcodecs-5.91.0/src/probers/nsSJISProber.cpp     2022-02-05 
22:19:28.000000000 +0100
@@ -27,10 +27,8 @@
         return mState;
     }
 
-    nsSMState codingState;
-
     for (unsigned int i = 0; i < aLen; i++) {
-        codingState = mCodingSM->NextState(aBuf[i]);
+        const nsSMState codingState = mCodingSM->NextState(aBuf[i]);
         if (codingState == eError) {
             mState = eNotMe;
             break;

Reply via email to