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
This commit is contained in:
jimblandy@gmail.com 2009-12-15 17:25:27 +00:00
parent 315c4f6b20
commit 5fb436d5bb
2 changed files with 7 additions and 1 deletions

View file

@ -29,6 +29,8 @@
#ifndef UTIL_DEBUGINFO_BYTEREADER_INL_H__ #ifndef UTIL_DEBUGINFO_BYTEREADER_INL_H__
#define UTIL_DEBUGINFO_BYTEREADER_INL_H__ #define UTIL_DEBUGINFO_BYTEREADER_INL_H__
#include <cassert>
#include "common/dwarf/bytereader.h" #include "common/dwarf/bytereader.h"
namespace dwarf2reader { namespace dwarf2reader {

View file

@ -28,6 +28,8 @@
#include <cassert> #include <cassert>
#include <cstdio> #include <cstdio>
#include <cstring>
#include <memory>
#include <stack> #include <stack>
#include <utility> #include <utility>
@ -90,7 +92,9 @@ void CompilationUnit::ReadAbbrevs() {
const char* abbrev_start = iter->second.first + const char* abbrev_start = iter->second.first +
header_.abbrev_offset; header_.abbrev_offset;
const char* abbrevptr = abbrev_start; const char* abbrevptr = abbrev_start;
#ifndef NDEBUG
const uint64 abbrev_length = iter->second.second - header_.abbrev_offset; const uint64 abbrev_length = iter->second.second - header_.abbrev_offset;
#endif
while (1) { while (1) {
CompilationUnit::Abbrev abbrev; CompilationUnit::Abbrev abbrev;
@ -466,7 +470,7 @@ void CompilationUnit::ProcessDIEs() {
// we need semantics of boost scoped_ptr here - no intention of trasnferring // 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 // ownership of the stack. use const, but then we limit ourselves to not
// ever being able to call .reset() on the smart pointer. // 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)) { while (dieptr < (lengthstart + header_.length)) {
// We give the user the absolute offset from the beginning of // We give the user the absolute offset from the beginning of