From c599749164ede08d1e68dbb857135eb75abb1f25 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 20 Feb 2011 08:43:25 +1100 Subject: Avoid some cppcheck warnings. --- src/AutoComplete.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx index 32cf7b2ed..f6a291fe9 100644 --- a/src/AutoComplete.cxx +++ b/src/AutoComplete.cxx @@ -129,11 +129,11 @@ void AutoComplete::Select(const char *word) { size_t lenWord = strlen(word); int location = -1; const int maxItemLen=1000; - char item[maxItemLen]; int start = 0; // lower bound of the api array block to search int end = lb->Length() - 1; // upper bound of the api array block to search while ((start <= end) && (location == -1)) { // Binary searching loop int pivot = (start + end) / 2; + char item[maxItemLen]; lb->GetValue(pivot, item, maxItemLen); int cond; if (ignoreCase) -- cgit v1.2.3