aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/parser
diff options
context:
space:
mode:
authorMax Horn2010-11-01 16:03:35 +0000
committerMax Horn2010-11-01 16:03:35 +0000
commita984fb17c2be039502eff55472dd6a252e5570df (patch)
tree1153ae5014aea017e5412d35735f81205e21ead5 /engines/sci/parser
parent2af270442144faec859114bcdce7e5659ac7f24b (diff)
downloadscummvm-rg350-a984fb17c2be039502eff55472dd6a252e5570df.tar.gz
scummvm-rg350-a984fb17c2be039502eff55472dd6a252e5570df.tar.bz2
scummvm-rg350-a984fb17c2be039502eff55472dd6a252e5570df.zip
GUI: Add GCC_PRINTF to GUI::Debugger::DebugPrintf & fix resulting warnings
svn-id: r54007
Diffstat (limited to 'engines/sci/parser')
-rw-r--r--engines/sci/parser/vocabulary.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp
index f9989b22a8..3e35bd652a 100644
--- a/engines/sci/parser/vocabulary.cpp
+++ b/engines/sci/parser/vocabulary.cpp
@@ -673,9 +673,15 @@ void Vocabulary::printParserNodes(int num) {
con->DebugPrintf(" Node %03x: ", i);
if (_parserNodes[i].type == kParseTreeLeafNode)
con->DebugPrintf("Leaf: %04x\n", _parserNodes[i].value);
- else
- con->DebugPrintf("Branch: ->%04x, ->%04x\n", _parserNodes[i].left,
- _parserNodes[i].right);
+ else {
+ // FIXME: Do we really want to print the *addresses*
+ // of the left & right child?
+ // Note that one or both may be zero pointers, so we can't just
+ // print their values.
+ con->DebugPrintf("Branch: ->%p, ->%p\n",
+ (const void *)_parserNodes[i].left,
+ (const void *)_parserNodes[i].right);
+ }
}
}