Skip to content

Commit eebcef5

Browse files
Fix MSVC compatibility in test-memory-exhaustion.cpp
Remove __attribute__((unused)) which is GCC/Clang-specific and doesn't work on MSVC. The unused variable was removed instead since it wasn't needed. Co-Authored-By: Alex Peng <[email protected]>
1 parent 501a75a commit eebcef5

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

tests/test-memory-exhaustion.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,12 @@ static void test_memory_pressure() {
7979
}
8080

8181
std::vector<ggml_tensor*> tensors;
82-
bool allocation_succeeded __attribute__((unused)) = true;
8382

8483
for (int i = 0; i < 100; i++) {
8584
ggml_tensor* tensor = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 256);
8685
if (tensor && tensor->data) {
8786
tensors.push_back(tensor);
8887
} else {
89-
allocation_succeeded = false;
9088
break;
9189
}
9290
}

0 commit comments

Comments
 (0)