From a253fd18fde8ca3e012430f8bbef928a2d22b2a2 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 4 May 2010 05:27:26 +0000 Subject: Fixed some warnings from clang --analyze. --- src/LexBullant.cxx | 1 + src/LexVHDL.cxx | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/LexBullant.cxx b/src/LexBullant.cxx index cc60cd2fc..d40e50bde 100644 --- a/src/LexBullant.cxx +++ b/src/LexBullant.cxx @@ -21,6 +21,7 @@ using namespace Scintilla; static int classifyWordBullant(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) { char s[100]; + s[0] = '\0'; for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) { s[i] = static_cast(tolower(styler[start + i])); s[i + 1] = '\0'; diff --git a/src/LexVHDL.cxx b/src/LexVHDL.cxx index c082cdb92..bd9a0a8ee 100644 --- a/src/LexVHDL.cxx +++ b/src/LexVHDL.cxx @@ -249,7 +249,6 @@ static void FoldNoBoxVHDLDoc( char chPrev = '\0'; char chNextNonBlank; int styleNext = styler.StyleAt(startPos); - int style = initStyle; //Platform::DebugPrintf("Line[%04d] Prev[%20s] ************************* Level[%x]\n", lineCurrent+1, prevWord, levelCurrent); /***************************************/ @@ -265,7 +264,7 @@ static void FoldNoBoxVHDLDoc( j ++ ; chNextNonBlank = styler.SafeGetCharAt(j); } - style = styleNext; + int style = styleNext; styleNext = styler.StyleAt(i + 1); bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); -- cgit v1.2.3