Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(760)

Unified Diff: src/common/dwarf/dwarf2reader_die_unittest.cc

Issue 1605153004: unittests: fix -Wnarrowing build errors (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: back to stdint.h Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/common/dwarf/dwarf2reader_cfi_unittest.cc ('k') | src/common/dwarf_cu_to_module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/common/dwarf/dwarf2reader_die_unittest.cc
diff --git a/src/common/dwarf/dwarf2reader_die_unittest.cc b/src/common/dwarf/dwarf2reader_die_unittest.cc
index 4e34436931924ba736453e2fcd353a279b2cb7f3..b53104fbfdc45e737c0d16569c2aca37d0258f22 100644
--- a/src/common/dwarf/dwarf2reader_die_unittest.cc
+++ b/src/common/dwarf/dwarf2reader_die_unittest.cc
@@ -31,6 +31,7 @@
// dwarf2reader_die_unittest.cc: Unit tests for dwarf2reader::CompilationUnit
+#include <stdint.h>
#include <stdlib.h>
#include <iostream>
@@ -91,7 +92,7 @@ class MockDwarf2Handler: public Dwarf2Handler {
MOCK_METHOD5(ProcessAttributeBuffer, void(uint64 offset,
enum DwarfAttribute attr,
enum DwarfForm form,
- const char* data,
+ const uint8_t *data,
uint64 len));
MOCK_METHOD4(ProcessAttributeString, void(uint64 offset,
enum DwarfAttribute attr,
@@ -132,9 +133,11 @@ struct DIEFixture {
assert(info.GetContents(&info_contents));
assert(abbrevs.GetContents(&abbrevs_contents));
section_map.clear();
- section_map[".debug_info"].first = info_contents.data();
+ section_map[".debug_info"].first
+ = reinterpret_cast<const uint8_t *>(info_contents.data());
section_map[".debug_info"].second = info_contents.size();
- section_map[".debug_abbrev"].first = abbrevs_contents.data();
+ section_map[".debug_abbrev"].first
+ = reinterpret_cast<const uint8_t *>(abbrevs_contents.data());
section_map[".debug_abbrev"].second = abbrevs_contents.size();
return section_map;
}
« no previous file with comments | « src/common/dwarf/dwarf2reader_cfi_unittest.cc ('k') | src/common/dwarf_cu_to_module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698