diff options
author | Neil <nyamatongwe@gmail.com> | 2014-02-02 18:15:20 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-02-02 18:15:20 +1100 |
commit | e35076efb13a7287b79a62ec67a1df3ab8022be8 (patch) | |
tree | 8b24c6dde850d890e32910a7f8664438960d1228 /lexers | |
parent | 253bc4cd3a19e93f7090c74af92a871765afe002 (diff) | |
download | scintilla-mirror-e35076efb13a7287b79a62ec67a1df3ab8022be8.tar.gz |
Avoid warnings.
Diffstat (limited to 'lexers')
-rw-r--r-- | lexers/LexMarkdown.cxx | 8 | ||||
-rw-r--r-- | lexers/LexTxt2tags.cxx | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lexers/LexMarkdown.cxx b/lexers/LexMarkdown.cxx index a92697707..c774b736f 100644 --- a/lexers/LexMarkdown.cxx +++ b/lexers/LexMarkdown.cxx @@ -118,10 +118,11 @@ static bool AtTermStart(StyleContext &sc) { } static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) { - int c, count = 1; + int count = 1; unsigned int i = 0; - while (++i) { - c = sc.GetRelative(i); + for (;;) { + ++i; + int c = sc.GetRelative(i); if (c == sc.ch) ++count; // hit a terminating character @@ -140,7 +141,6 @@ static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) { } } } - return false; } static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle, diff --git a/lexers/LexTxt2tags.cxx b/lexers/LexTxt2tags.cxx index 8f8e181ba..fd4a96c33 100644 --- a/lexers/LexTxt2tags.cxx +++ b/lexers/LexTxt2tags.cxx @@ -78,10 +78,11 @@ static bool HasPrevLineContent(StyleContext &sc) { // Separator line static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) { - int c, count = 1; + int count = 1; unsigned int i = 0; - while (++i) { - c = sc.GetRelative(i); + for (;;) { + ++i; + int c = sc.GetRelative(i); if (c == sc.ch) ++count; // hit a terminating character @@ -100,7 +101,6 @@ static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) { } } } - return false; } static void ColorizeTxt2tagsDoc(unsigned int startPos, int length, int initStyle, |