diff options
author | Neil <nyamatongwe@gmail.com> | 2014-03-17 09:41:16 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-03-17 09:41:16 +1100 |
commit | 44d614e2dac0488d3bf3e0f65368bc7515fa91c5 (patch) | |
tree | b9737c15c2b68babac9617c0eebb2e37b726bc51 | |
parent | c7227c607ffe98325722e918506a4e39084c6c98 (diff) | |
download | scintilla-mirror-44d614e2dac0488d3bf3e0f65368bc7515fa91c5.tar.gz |
Avoid warning about excessive variable scope.
-rw-r--r-- | cppcheck.suppress | 1 | ||||
-rw-r--r-- | lexers/LexCoffeeScript.cxx | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/cppcheck.suppress b/cppcheck.suppress index 9aed019cf..51856ef3a 100644 --- a/cppcheck.suppress +++ b/cppcheck.suppress @@ -12,7 +12,6 @@ useInitializationList:scintilla/lexers/LexBasic.cxx noCopyConstructor:scintilla/lexers/LexBash.cxx
variableScope:scintilla/lexers/LexBash.cxx
variableScope:scintilla/lexers/LexCmake.cxx
-variableScope:scintilla/lexers/LexCoffeeScript.cxx
variableScope:scintilla/lexers/LexCSS.cxx
useInitializationList:scintilla/lexers/LexD.cxx
variableScope:scintilla/lexers/LexErlang.cxx
diff --git a/lexers/LexCoffeeScript.cxx b/lexers/LexCoffeeScript.cxx index c5ef0effa..fc9b4998a 100644 --- a/lexers/LexCoffeeScript.cxx +++ b/lexers/LexCoffeeScript.cxx @@ -66,9 +66,8 @@ static bool followsReturnKeyword(StyleContext &sc, Accessor &styler) { int pos = (int) sc.currentPos; int currentLine = styler.GetLine(pos); int lineStartPos = styler.LineStart(currentLine); - char ch; while (--pos > lineStartPos) { - ch = styler.SafeGetCharAt(pos); + char ch = styler.SafeGetCharAt(pos); if (ch != ' ' && ch != '\t') { break; } |