mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-06 14:38:19 +01:00
convert to uint8_t* for binary data to fix -Wnarrowing build errors
Newer gcc versions default to -Werror=narrowing when using newer C++
standards (which we do). This causes issues when we try to stuff a
value like 0xea into a char -- the value is out of range for signed
char bytes. That's when gcc throws an error:
.../bytereader_unittest.cc: In member function 'virtual void Reader_DW_EH_PE_absptr4_Test::TestBody()':
.../bytereader_unittest.cc:400:55: error: narrowing conversion of '234' from 'int' to 'char' inside { } [-Wnarrowing]
BUG=chromium:579384
TEST=`make check` passes
R=mark@chromium.org
Review URL: https://codereview.chromium.org/1605153004 .
This commit is contained in:
parent
b16c640e09
commit
bc44efdc27
16 changed files with 219 additions and 173 deletions
|
|
@ -32,6 +32,7 @@
|
|||
// See dwarf2diehandler.h for details.
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
|
|
@ -167,7 +168,7 @@ void DIEDispatcher::ProcessAttributeReference(uint64 offset,
|
|||
void DIEDispatcher::ProcessAttributeBuffer(uint64 offset,
|
||||
enum DwarfAttribute attr,
|
||||
enum DwarfForm form,
|
||||
const char* data,
|
||||
const uint8_t *data,
|
||||
uint64 len) {
|
||||
HandlerStack ¤t = die_handlers_.top();
|
||||
// This had better be an attribute of the DIE we were meant to handle.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue