From cee4f65d4a0fdbfcbfe3d46c3ffb5a9df9a2ec9e Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 26 Nov 2024 22:31:20 -0600 Subject: [PATCH] [ox/std] Replace an unsafe buffer --- deps/ox/src/ox/std/test/tests.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deps/ox/src/ox/std/test/tests.cpp b/deps/ox/src/ox/std/test/tests.cpp index b174dc64..2f734291 100644 --- a/deps/ox/src/ox/std/test/tests.cpp +++ b/deps/ox/src/ox/std/test/tests.cpp @@ -472,13 +472,13 @@ OX_CLANG_NOWARN_END }, }; -int main(int argc, const char **args) { +int main(int argc, const char **argv) { if (argc < 2) { oxError("Must specify test to run"); + return -1; } -OX_CLANG_NOWARN_BEGIN(-Wunsafe-buffer-usage) + auto const args = ox::SpanView{argv, static_cast(argc)}; auto const testName = args[1]; -OX_CLANG_NOWARN_END auto const func = tests.find(testName); if (func != tests.end()) { oxAssert(func->second(), "Test returned Error");