Fix a few small issues found by GCC

Building Crashpad with GCC flagged a few potential issues. The issues
don't seem particularly severe, but they are easy enough to fix.

Note that even with these changes, Crashpad will not cleanly build with
GCC (additional patches would be needed to third_party/mini_chromium).

Bug: crashpad:
Change-Id: I9289d6c918da9a111aa3c2a078ad0dc1ba84749f
Reviewed-on: https://chromium-review.googlesource.com/1014280
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Leonard Mosescu <mosescu@chromium.org>
This commit is contained in:
Leonard Mosescu 2018-04-16 10:23:21 -07:00 committed by Commit Bot
parent 799dcef4c9
commit a7c30f0501
2 changed files with 4 additions and 3 deletions

View File

@ -164,6 +164,7 @@ class PtraceStrategyDeciderImpl : public PtraceStrategyDecider {
}
DCHECK(false);
return Strategy::kError;
}
private:

View File

@ -350,7 +350,7 @@ void DoReadUnmappedChildMainSetup(ScopedMmap* pages,
CRASHPAD_CHILD_TEST_MAIN(ReadUnmappedChildMain) {
ScopedMmap pages;
VMAddress address;
VMAddress address = 0;
size_t page_size, region_size;
DoReadUnmappedChildMainSetup(&pages, &address, &page_size, &region_size);
FileHandle out = StdioFileHandle(StdioStream::kStandardOutput);
@ -369,7 +369,7 @@ class ReadUnmappedTest : public MultiprocessExec {
void RunAgainstSelf() {
ScopedMmap pages;
VMAddress address;
VMAddress address = 0;
size_t page_size, region_size;
DoReadUnmappedChildMainSetup(&pages, &address, &page_size, &region_size);
DoTest(GetSelfProcess(), address, page_size, region_size);
@ -379,7 +379,7 @@ class ReadUnmappedTest : public MultiprocessExec {
private:
void MultiprocessParent() override {
VMAddress address;
VMAddress address = 0;
size_t page_size, region_size;
ASSERT_TRUE(ReadFileExactly(ReadPipeHandle(), &address, sizeof(address)));
ASSERT_TRUE(