Fix compiler errors found with -Wunreachable-code-aggressive.

Break statements immediately following returns are unreachable.

Bug: chromium:1246232
Change-Id: I0892a66617f7b27b5e317a7d9741f5fcd19249f2
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3140192
Reviewed-by: Robert Sesek <rsesek@chromium.org>
This commit is contained in:
Lei Zhang 2021-09-02 22:11:00 -07:00
parent e87bb1b3b4
commit 4722484bf6
3 changed files with 0 additions and 6 deletions

View file

@ -212,7 +212,6 @@ bool ExploitabilityLinux::EndedOnIllegalWrite(uint64_t instruction_ptr) {
// Unsupported architecture. Note that ARM architectures are not
// supported because objdump does not support ARM.
return false;
break;
}
// Get memory region around instruction pointer and the number of bytes
@ -382,7 +381,6 @@ bool ExploitabilityLinux::CalculateAddress(const string& address_expression,
// This should not occur since the same switch condition
// should have terminated this method.
return false;
break;
}
// Add or subtract constant from write address (if applicable).
@ -616,10 +614,8 @@ bool ExploitabilityLinux::BenignCrashTrigger(
case MD_EXCEPTION_CODE_LIN_SIGSYS:
case MD_EXCEPTION_CODE_LIN_DUMP_REQUESTED:
return true;
break;
default:
return false;
break;
}
}

View file

@ -193,7 +193,6 @@ ExploitabilityRating ExploitabilityWin::CheckPlatformExploitability() {
default:
BPLOG(INFO) << "Unrecognized access violation type.";
return EXPLOITABILITY_ERR_PROCESSING;
break;
}
MinidumpMemoryRegion* instruction_region = 0;
if (memory_available) {

View file

@ -1163,7 +1163,6 @@ bool MinidumpContext::Read(uint32_t expected_size) {
BPLOG(INFO) << "MinidumpContext unknown context type " <<
HexString(cpu_type);
return false;
break;
}
}
SetContextFlags(context_flags);