From: Mikko Rasa Date: Sat, 3 Nov 2012 13:54:33 +0000 (+0200) Subject: Fix some warnings about uninitialized variables X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=5281356f7e81ffed6337d3ac67c0e8d3e1605000 Fix some warnings about uninitialized variables In reality they are always initialized when they're used, but the compiler doesn't necessarily know that. --- 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