mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
linux: Fix gcc -Wparentheses error from 7a0daa6989a9
../../snapshot/elf/elf_image_reader.cc:261:29: error: suggest parentheses around ‘-’ in operand of ‘&’ [-Werror=parentheses] #define PAD(x) ((x) + align - 1 & ~(align - 1)) ~~~~~~~~~~~~^~~ ../../snapshot/elf/elf_image_reader.cc:262:26: note: in expansion of macro ‘PAD’ size_t padded_namesz = PAD(note_info.n_namesz); ^~~ Change-Id: I5cabc2741c8541ae9cf66933d35658e1cbc20912 Reviewed-on: https://chromium-review.googlesource.com/817575 Reviewed-by: Joshua Peraza <jperaza@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
ac3cc1b884
commit
c04c05564d
@ -258,7 +258,7 @@ ElfImageReader::NoteReader::Result ElfImageReader::NoteReader::ReadNote(
|
||||
current_address_ += sizeof(note_info);
|
||||
|
||||
constexpr size_t align = sizeof(note_info.n_namesz);
|
||||
#define PAD(x) ((x) + align - 1 & ~(align - 1))
|
||||
#define PAD(x) (((x) + align - 1) & ~(align - 1))
|
||||
size_t padded_namesz = PAD(note_info.n_namesz);
|
||||
size_t padded_descsz = PAD(note_info.n_descsz);
|
||||
size_t note_size = padded_namesz + padded_descsz;
|
||||
|
Loading…
x
Reference in New Issue
Block a user