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

Unified Diff: src/common/dwarf_cu_to_module_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_cu_to_module.cc ('k') | src/common/linux/dump_symbols.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/common/dwarf_cu_to_module_unittest.cc
diff --git a/src/common/dwarf_cu_to_module_unittest.cc b/src/common/dwarf_cu_to_module_unittest.cc
index 9ff842c882e6f9414b9e82bf5b64fee9b845718e..0ae73e8167946487711c4b3b760112e3faa2ad51 100644
--- a/src/common/dwarf_cu_to_module_unittest.cc
+++ b/src/common/dwarf_cu_to_module_unittest.cc
@@ -31,6 +31,8 @@
// dwarf_cu_to_module.cc: Unit tests for google_breakpad::DwarfCUToModule.
+#include <stdint.h>
+
#include <string>
#include <utility>
#include <vector>
@@ -65,7 +67,7 @@ using ::testing::ValuesIn;
class MockLineToModuleHandler: public DwarfCUToModule::LineToModuleHandler {
public:
MOCK_METHOD1(StartCompilationUnit, void(const string& compilation_dir));
- MOCK_METHOD4(ReadProgram, void(const char* program, uint64 length,
+ MOCK_METHOD4(ReadProgram, void(const uint8_t *program, uint64 length,
Module *module, vector<Module::Line> *lines));
};
@@ -111,7 +113,7 @@ class CUFixtureBase {
public:
explicit AppendLinesFunctor(
const vector<Module::Line> *lines) : lines_(lines) { }
- void operator()(const char *program, uint64 length,
+ void operator()(const uint8_t *program, uint64 length,
Module *module, vector<Module::Line> *lines) {
lines->insert(lines->end(), lines_->begin(), lines_->end());
}
@@ -285,7 +287,7 @@ class CUFixtureBase {
// Mock line program reader.
MockLineToModuleHandler line_reader_;
AppendLinesFunctor appender_;
- static const char dummy_line_program_[];
+ static const uint8_t dummy_line_program_[];
static const size_t dummy_line_size_;
MockWarningReporter reporter_;
@@ -302,7 +304,7 @@ class CUFixtureBase {
bool functions_filled_;
};
-const char CUFixtureBase::dummy_line_program_[] = "lots of fun data";
+const uint8_t CUFixtureBase::dummy_line_program_[] = "lots of fun data";
const size_t CUFixtureBase::dummy_line_size_ =
sizeof(CUFixtureBase::dummy_line_program_);
@@ -375,7 +377,7 @@ void CUFixtureBase::ProcessStrangeAttributes(
handler->ProcessAttributeReference((DwarfAttribute) 0xf7f7480f,
(DwarfForm) 0x829e038a,
0x50fddef44734fdecULL);
- static const char buffer[10] = "frobynode";
+ static const uint8_t buffer[10] = "frobynode";
handler->ProcessAttributeBuffer((DwarfAttribute) 0xa55ffb51,
(DwarfForm) 0x2f43b041,
buffer, sizeof(buffer));
« no previous file with comments | « src/common/dwarf_cu_to_module.cc ('k') | src/common/linux/dump_symbols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698