mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +08:00
Fix Chromium build with DPLOG_IF
Chromium has many build configurations. One important configuration that’s not tested by its commit queue doesn’t use |condition| in DLOG_IF(severity, condition) or any of the D*LOG_IF macros, resulting in errors such as …/handler/handler_main.cc:166:7: error: unused variable 'rv' [-Werror,-Wunused-variable] int rv = sigaction(sig, &sa, nullptr); ^ BUG=chromium:695314 Change-Id: I09a57379e8276b5ffa7f8f81706581a802d76809 Reviewed-on: https://chromium-review.googlesource.com/446559 Reviewed-by: Robert Sesek <rsesek@chromium.org>
This commit is contained in:
parent
6da9708e7c
commit
4a2043ea65
@ -165,6 +165,7 @@ void RestoreDefaultSignalHandler(int sig) {
|
||||
sa.sa_handler = SIG_DFL;
|
||||
int rv = sigaction(sig, &sa, nullptr);
|
||||
DPLOG_IF(ERROR, rv != 0) << "sigaction " << sig;
|
||||
ALLOW_UNUSED_LOCAL(rv);
|
||||
}
|
||||
|
||||
void HandleCrashSignal(int sig, siginfo_t* siginfo, void* context) {
|
||||
@ -240,6 +241,7 @@ void HandleCrashSignal(int sig, siginfo_t* siginfo, void* context) {
|
||||
// initially triggered.
|
||||
int rv = raise(sig);
|
||||
DPLOG_IF(ERROR, rv != 0) << "raise";
|
||||
ALLOW_UNUSED_LOCAL(rv);
|
||||
}
|
||||
}
|
||||
|
||||
@ -253,6 +255,7 @@ void HandleTerminateSignal(int sig, siginfo_t* siginfo, void* context) {
|
||||
// because termination signals never originate in that way.
|
||||
int rv = raise(sig);
|
||||
DPLOG_IF(ERROR, rv != 0) << "raise";
|
||||
ALLOW_UNUSED_LOCAL(rv);
|
||||
}
|
||||
|
||||
void InstallCrashHandler() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user