[ox/fs] Suppress unsafe buffer warnings

This commit is contained in:
2024-11-26 22:30:57 -06:00
parent 287d42f2b9
commit cd3eeeef14
10 changed files with 46 additions and 14 deletions

View File

@@ -226,13 +226,14 @@ const std::map<ox::StringView, std::function<ox::Error(ox::StringView)>> tests =
},
};
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;
}
auto const args = ox::SpanView{argv, static_cast<size_t>(argc)};
ox::StringView const testName = args[1];
ox::StringView const testArg = args[2] ? args[2] : nullptr;
ox::StringView const testArg = argc >= 3 ? args[2] : nullptr;
auto const func = tests.find(testName);
if (func != tests.end()) {
oxAssert(func->second(testArg), "Test returned Error");