diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-11-25 14:54:14 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-11-25 14:54:14 +0000 |
commit | 0633bdfcc370f57992be9cac76b11b26df409f24 (patch) | |
tree | 41066a50e709d7116dc4bfdf9fd6047261ea0778 /trace_parser.hpp | |
parent | 1a65d4f6b72866dc04547ecbe7262174ef09cc9a (diff) |
More parameters. Cleanups.
Diffstat (limited to 'trace_parser.hpp')
-rw-r--r-- | trace_parser.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/trace_parser.hpp b/trace_parser.hpp index 39fcfda..ed9fc7e 100644 --- a/trace_parser.hpp +++ b/trace_parser.hpp @@ -158,7 +158,7 @@ public: } Value *parse_sint() { - return new SInt(-read_uint()); + return new SInt(-(signed long long)read_uint()); } Value *parse_uint() { @@ -194,7 +194,7 @@ public: c = read_byte(); switch(c) { case Trace::TYPE_SINT: - value |= -read_uint(); + value |= -(signed long long)read_uint(); break; case Trace::TYPE_UINT: value |= read_uint(); @@ -235,7 +235,7 @@ done: Value *parse_struct() { size_t length = read_uint(); /* XXX */ - for (size_t i; i < length; ++i) { + for (size_t i = 0; i < length; ++i) { std::string name = read_name(); Value *value = parse_value(); std::cout << " " << name << " = " << value << "\n"; |