aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf/dwarf2reader.cc
diff options
context:
space:
mode:
authorjimblandy@gmail.com <jimblandy@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-12-15 17:25:27 +0000
committerjimblandy@gmail.com <jimblandy@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-12-15 17:25:27 +0000
commit5fb436d5bb74496e7f2b0dddb3649911d1c49df4 (patch)
treed149c078e7627b220db68886ac8b54b78cfbcd50 /src/common/dwarf/dwarf2reader.cc
parentIssue 41003: Breakpad DWARF parser: Include <cstdio>, since we use it (diff)
downloadbreakpad-5fb436d5bb74496e7f2b0dddb3649911d1c49df4.tar.xz
Issue 41004: Breakpad DWARF parser: fixes to compile without warnings under GNU C++ 4.3.3.
a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@450 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/dwarf/dwarf2reader.cc')
-rw-r--r--src/common/dwarf/dwarf2reader.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/dwarf/dwarf2reader.cc b/src/common/dwarf/dwarf2reader.cc
index cc5cbca9..2580606f 100644
--- a/src/common/dwarf/dwarf2reader.cc
+++ b/src/common/dwarf/dwarf2reader.cc
@@ -28,6 +28,8 @@
#include <cassert>
#include <cstdio>
+#include <cstring>
+#include <memory>
#include <stack>
#include <utility>
@@ -90,7 +92,9 @@ void CompilationUnit::ReadAbbrevs() {
const char* abbrev_start = iter->second.first +
header_.abbrev_offset;
const char* abbrevptr = abbrev_start;
+#ifndef NDEBUG
const uint64 abbrev_length = iter->second.second - header_.abbrev_offset;
+#endif
while (1) {
CompilationUnit::Abbrev abbrev;
@@ -466,7 +470,7 @@ void CompilationUnit::ProcessDIEs() {
// we need semantics of boost scoped_ptr here - no intention of trasnferring
// ownership of the stack. use const, but then we limit ourselves to not
// ever being able to call .reset() on the smart pointer.
- auto_ptr<stack<uint64> > const die_stack(new stack<uint64>);
+ std::auto_ptr<stack<uint64> > const die_stack(new stack<uint64>);
while (dieptr < (lengthstart + header_.length)) {
// We give the user the absolute offset from the beginning of