mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 16:37:08 +00:00
Add NXT_UNUSED to silence unused warnings
This commit is contained in:
committed by
Corentin Wallez
parent
5ab96e0d40
commit
82565b340f
@@ -51,7 +51,7 @@ TEST_F(BitSetIteratorTest, EmptySet) {
|
||||
// causing an unreachable code warning in MSVS
|
||||
bool sawBit = false;
|
||||
for (unsigned long bit : IterateBitSet(mStateBits)) {
|
||||
(void) bit;
|
||||
NXT_UNUSED(bit);
|
||||
sawBit = true;
|
||||
}
|
||||
EXPECT_FALSE(sawBit);
|
||||
|
||||
@@ -178,7 +178,7 @@ TEST(ErrorTests, TRY_RESULT_Error) {
|
||||
auto Try = [ReturnError]() -> ResultOrError<int*> {
|
||||
int* result = nullptr;
|
||||
NXT_TRY_ASSIGN(result, ReturnError());
|
||||
(void) result;
|
||||
NXT_UNUSED(result);
|
||||
|
||||
// NXT_TRY should return before this point
|
||||
EXPECT_FALSE(true);
|
||||
@@ -233,7 +233,7 @@ TEST(ErrorTests, TRY_RESULT_ConversionToError) {
|
||||
auto Try = [ReturnError]() -> MaybeError {
|
||||
int* result = nullptr;
|
||||
NXT_TRY_ASSIGN(result, ReturnError());
|
||||
(void) result;
|
||||
NXT_UNUSED(result);
|
||||
|
||||
return {};
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ TEST(SerialQueue, BasicTest) {
|
||||
|
||||
// Iterating on empty queue 1) works 2) doesn't produce any values
|
||||
for (int value : queue.IterateAll()) {
|
||||
(void) value;
|
||||
NXT_UNUSED(value);
|
||||
ASSERT_TRUE(false);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ TEST(SerialQueue, BasicTest) {
|
||||
ASSERT_TRUE(queue.Empty());
|
||||
|
||||
for (int value : queue.IterateAll()) {
|
||||
(void) value;
|
||||
NXT_UNUSED(value);
|
||||
ASSERT_TRUE(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user