From ab5d29b6fe71402c37b4a7e1e78c2c3c0f4e5ddf Mon Sep 17 00:00:00 2001 From: Don Ho Date: Wed, 8 Mar 2023 00:28:42 +0100 Subject: [PATCH] Code enhancement: remove some MSVS analysis warning (Part 4) --- .../src/uchardet/nsSBCSGroupProber.cpp | 12 ++--- PowerEditor/visual.net/notepadPlus.ruleset | 48 +++++++++---------- 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/PowerEditor/src/uchardet/nsSBCSGroupProber.cpp b/PowerEditor/src/uchardet/nsSBCSGroupProber.cpp index d8fef879c..e8982540f 100644 --- a/PowerEditor/src/uchardet/nsSBCSGroupProber.cpp +++ b/PowerEditor/src/uchardet/nsSBCSGroupProber.cpp @@ -141,11 +141,11 @@ nsProbingState nsSBCSGroupProber::HandleData(const char* aBuf, PRUint32 aLen) //this is done without any consideration to KeepEnglishLetters //of each prober since as of now, there are no probers here which //recognize languages with English characters. - if (!FilterWithoutEnglishLetters(aBuf, aLen, &newBuf1, newLen1)) - goto done; - - if (newLen1 == 0) - goto done; // Nothing to see here, move on. + if (!FilterWithoutEnglishLetters(aBuf, aLen, &newBuf1, newLen1) || newLen1 == 0) + { + PR_FREEIF(newBuf1); + return mState; + } for (i = 0; i < NUM_OF_SBCS_PROBERS; i++) { @@ -170,9 +170,7 @@ nsProbingState nsSBCSGroupProber::HandleData(const char* aBuf, PRUint32 aLen) } } -done: PR_FREEIF(newBuf1); - return mState; } diff --git a/PowerEditor/visual.net/notepadPlus.ruleset b/PowerEditor/visual.net/notepadPlus.ruleset index 94889ff77..2fde9ee3c 100644 --- a/PowerEditor/visual.net/notepadPlus.ruleset +++ b/PowerEditor/visual.net/notepadPlus.ruleset @@ -40,7 +40,7 @@ - + @@ -48,59 +48,59 @@ - + - + - - + + - - + + - + - - + + - + - + - - - + + + - + - - - + + + - - + + - + @@ -115,7 +115,7 @@ - + @@ -201,7 +201,7 @@ - +