From 5281356f7e81ffed6337d3ac67c0e8d3e1605000 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 3 Nov 2012 15:54:33 +0200 Subject: [PATCH] Fix some warnings about uninitialized variables In reality they are always initialized when they're used, but the compiler doesn't necessarily know that. --- source/programbuilder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/programbuilder.cpp b/source/programbuilder.cpp index c97ec1cb..30457838 100644 --- a/source/programbuilder.cpp +++ b/source/programbuilder.cpp @@ -375,7 +375,8 @@ vector ProgramBuilder::extract_identifiers(const char *expression) { vector result; const char *ptr = expression; - unsigned start, length; + unsigned start = 0; + unsigned length = 0; while(parse_identifier(ptr, start, length)) { result.push_back(string(ptr+start, length)); @@ -388,7 +389,8 @@ string ProgramBuilder::replace_identifiers(const char *expression, const map