aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-29 13:42:49 -0800
committerLei Zhang <thestig@chromium.org>2015-12-29 13:42:49 -0800
commit257123ca70f1895cd6fd37c75ebaeef2de9e17b1 (patch)
tree1b45635ad754be8ec2b653a730c9734d4c76667b /src/common
parentRemove use of deprecated CFURLCreateDataAndPropertiesFromResource function. (diff)
downloadbreakpad-257123ca70f1895cd6fd37c75ebaeef2de9e17b1.tar.xz
Let breakpad build with -Wall on OS X and Linux.
A=thakis@chromium.org Original Review: https://codereview.chromium.org/1550933002/ R=thakis@chromium.org Review URL: https://codereview.chromium.org/1554613002 .
Diffstat (limited to 'src/common')
-rw-r--r--src/common/dwarf/dwarf2reader.cc6
-rw-r--r--src/common/dwarf/dwarf2reader.h2
-rw-r--r--src/common/linux/dump_symbols.cc1
-rw-r--r--src/common/linux/libcurl_wrapper.h2
-rw-r--r--src/common/linux/synth_elf.cc4
-rw-r--r--src/common/linux/synth_elf.h2
6 files changed, 12 insertions, 5 deletions
diff --git a/src/common/dwarf/dwarf2reader.cc b/src/common/dwarf/dwarf2reader.cc
index f2f3d581..49c2ee15 100644
--- a/src/common/dwarf/dwarf2reader.cc
+++ b/src/common/dwarf/dwarf2reader.cc
@@ -517,8 +517,10 @@ void CompilationUnit::ProcessDIEs() {
LineInfo::LineInfo(const char* buffer, uint64 buffer_length,
ByteReader* reader, LineInfoHandler* handler):
- handler_(handler), reader_(reader), buffer_(buffer),
- buffer_length_(buffer_length) {
+ handler_(handler), reader_(reader), buffer_(buffer) {
+#ifndef NDEBUG
+ buffer_length_ = buffer_length;
+#endif
header_.std_opcode_lengths = NULL;
}
diff --git a/src/common/dwarf/dwarf2reader.h b/src/common/dwarf/dwarf2reader.h
index 8824bf90..e4f7f495 100644
--- a/src/common/dwarf/dwarf2reader.h
+++ b/src/common/dwarf/dwarf2reader.h
@@ -140,7 +140,9 @@ class LineInfo {
// the line info to read is. after_header is the place right after
// the end of the line information header.
const char* buffer_;
+#ifndef NDEBUG
uint64 buffer_length_;
+#endif
const char* after_header_;
};
diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc
index 1e96ca6a..5ae44e53 100644
--- a/src/common/linux/dump_symbols.cc
+++ b/src/common/linux/dump_symbols.cc
@@ -889,7 +889,6 @@ bool ReadSymbolDataElfClass(const typename ElfClass::Ehdr* elf_header,
const DumpOptions& options,
Module** out_module) {
typedef typename ElfClass::Ehdr Ehdr;
- typedef typename ElfClass::Shdr Shdr;
*out_module = NULL;
diff --git a/src/common/linux/libcurl_wrapper.h b/src/common/linux/libcurl_wrapper.h
index de84a63b..25905ad8 100644
--- a/src/common/linux/libcurl_wrapper.h
+++ b/src/common/linux/libcurl_wrapper.h
@@ -43,7 +43,7 @@ namespace google_breakpad {
class LibcurlWrapper {
public:
LibcurlWrapper();
- ~LibcurlWrapper();
+ virtual ~LibcurlWrapper();
virtual bool Init();
virtual bool SetProxy(const string& proxy_host,
const string& proxy_userpwd);
diff --git a/src/common/linux/synth_elf.cc b/src/common/linux/synth_elf.cc
index b978550f..98e81dab 100644
--- a/src/common/linux/synth_elf.cc
+++ b/src/common/linux/synth_elf.cc
@@ -213,8 +213,10 @@ void ELF::Finish() {
SymbolTable::SymbolTable(Endianness endianness,
size_t addr_size,
StringTable& table) : Section(endianness),
- addr_size_(addr_size),
table_(table) {
+#ifndef NDEBUG
+ addr_size_ = addr_size;
+#endif
assert(addr_size_ == 4 || addr_size_ == 8);
}
diff --git a/src/common/linux/synth_elf.h b/src/common/linux/synth_elf.h
index 330ceae8..1d2a20ca 100644
--- a/src/common/linux/synth_elf.h
+++ b/src/common/linux/synth_elf.h
@@ -173,7 +173,9 @@ class SymbolTable : public Section {
uint64_t size, unsigned info, uint16_t shndx);
private:
+#ifndef NDEBUG
size_t addr_size_;
+#endif
StringTable& table_;
};