Bug 1732208 - Silence the unused-but-set-variable warning in platform-linux-android.cpp. r=gerald

platform-linux-android.cpp:199:9: error: variable 'r' set but not used [-Werror,-Wunused-but-set-variable]
    int r = sem_init(&mMessage2, /* pshared */ 0, 0);
        ^
platform-linux-android.cpp:206:9: error: variable 'r' set but not used [-Werror,-Wunused-but-set-variable]
 not used [-Werror,-Wunused-but-set-variable]
    int r = sem_destroy(&mMessage2);
        ^

Differential Revision: https://phabricator.services.mozilla.com/D126459
This commit is contained in:
Mike Hommey 2021-09-28 00:02:47 +00:00
parent cf6298e15e
commit 49ee506e32
2 changed files with 4 additions and 0 deletions

View File

@ -200,6 +200,7 @@ struct SigHandlerCoordinator {
r |= sem_init(&mMessage3, /* pshared */ 0, 0);
r |= sem_init(&mMessage4, /* pshared */ 0, 0);
MOZ_ASSERT(r == 0);
(void)r;
}
~SigHandlerCoordinator() {
@ -207,6 +208,7 @@ struct SigHandlerCoordinator {
r |= sem_destroy(&mMessage3);
r |= sem_destroy(&mMessage4);
MOZ_ASSERT(r == 0);
(void)r;
}
sem_t mMessage2; // To sampler: "context is in sSigHandlerCoordinator"

View File

@ -194,6 +194,7 @@ struct SigHandlerCoordinator {
r |= sem_init(&mMessage3, /* pshared */ 0, 0);
r |= sem_init(&mMessage4, /* pshared */ 0, 0);
MOZ_ASSERT(r == 0);
(void)r;
}
~SigHandlerCoordinator() {
@ -201,6 +202,7 @@ struct SigHandlerCoordinator {
r |= sem_destroy(&mMessage3);
r |= sem_destroy(&mMessage4);
MOZ_ASSERT(r == 0);
(void)r;
}
sem_t mMessage2; // To sampler: "context is in sSigHandlerCoordinator"