[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

@@ -32,7 +32,9 @@ FileAddress::FileAddress(ox::StringViewCR path) noexcept {
auto pathSize = path.bytes();
m_data.path = new char[pathSize + 1];
memcpy(m_data.path, path.data(), pathSize);
OX_CLANG_NOWARN_BEGIN(-Wunsafe-buffer-usage)
m_data.path[pathSize] = 0;
OX_CLANG_NOWARN_END
m_type = FileAddressType::Path;
}