summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-10-29 07:18:09 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-10-29 07:18:09 +0000
commit15a69d3510b5a53fcdf793785deca3af1f0adc4f (patch)
tree3c1602cf14c35ccdb10317a91d2776bd898f5541
parentfc602fd37554f5e2d58fcee71a58e380d23d22d4 (diff)
Fixed compilation warning on gcc3.4 (should work ok on gcc4, working around it anyway)
git-svn-id: http://pugixml.googlecode.com/svn/trunk@192 99668b35-9821-0410-8761-19e4c4f06640
-rw-r--r--src/pugixpath.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pugixpath.cpp b/src/pugixpath.cpp
index 68ddfd0..34f1cfe 100644
--- a/src/pugixpath.cpp
+++ b/src/pugixpath.cpp
@@ -3283,11 +3283,13 @@ namespace pugi
if (m_lexer.current() == lex_slash)
{
// Save state for next lexeme - that is, whatever follows '/'
- const char* state = m_lexer.state();
+ const char* state = 0; // gcc3 "variable might be used uninitialized in this function" bug workaround
+ state = m_lexer.state();
m_lexer.next();
- xpath_ast_node* n = new (m_alloc.node()) xpath_ast_node(ast_step_root);
+ xpath_ast_node* n = 0; // gcc3 "variable might be used uninitialized in this function" bug workaround
+ n = new (m_alloc.node()) xpath_ast_node(ast_step_root);
try
{