diff --git a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp index fa31b7b0..092980bd 100644 --- a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp +++ b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp @@ -6,7 +6,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#if __has_include() +#if __has_include() && defined(OX_USE_STDLIB) #include diff --git a/deps/ox/src/ox/mc/intops.hpp b/deps/ox/src/ox/mc/intops.hpp index b6e6ac6a..b4602aff 100644 --- a/deps/ox/src/ox/mc/intops.hpp +++ b/deps/ox/src/ox/mc/intops.hpp @@ -54,6 +54,11 @@ struct McInt { std::size_t length = 0; }; +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-align" +#endif + template [[nodiscard]] McInt encodeInteger(I input) noexcept { McInt out; @@ -144,6 +149,10 @@ template return {0, OxError(1)}; } +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + template [[nodiscard]] ValErr decodeInteger(McInt m) noexcept { std::size_t bytesRead; diff --git a/deps/ox/src/ox/mc/read.hpp b/deps/ox/src/ox/mc/read.hpp index e148edb7..80e91844 100644 --- a/deps/ox/src/ox/mc/read.hpp +++ b/deps/ox/src/ox/mc/read.hpp @@ -112,7 +112,7 @@ Error MetalClawReader::field(const char*, T *val) { err |= model(&reader, val); } return err; -}; +} template Error MetalClawReader::field(const char *name, ox::BString *val) { @@ -134,7 +134,7 @@ Error MetalClawReader::readInteger(I *val) { *val = 0; } return OxError(0); -}; +} // array handler template @@ -162,7 +162,7 @@ Error MetalClawReader::field(const char*, T *val, std::size_t valLen) { } } return err; -}; +} template Error MetalClawReader::field(const char*, ox::Vector *val) { diff --git a/deps/ox/src/ox/model/descwrite.cpp b/deps/ox/src/ox/model/descwrite.cpp index d1681fd9..d9befca7 100644 --- a/deps/ox/src/ox/model/descwrite.cpp +++ b/deps/ox/src/ox/model/descwrite.cpp @@ -27,12 +27,6 @@ static_assert([] { return indirectionLevels(i) == 1; }(), "indirectionLevels broken: indirectionLevels(int[])"); -static_assert([] { - int i[2][2] = {{}}; - return indirectionLevels(i) == 2; -}(), "indirectionLevels broken: indirectionLevels(int[][])"); - - TypeDescWriter::TypeDescWriter(TypeStore *typeStore) { if (!typeStore) { m_typeStoreOwnerRef = new TypeStore; diff --git a/deps/ox/src/ox/std/buildinfo.cpp b/deps/ox/src/ox/std/buildinfo.cpp index 57f529ba..ba757417 100644 --- a/deps/ox/src/ox/std/buildinfo.cpp +++ b/deps/ox/src/ox/std/buildinfo.cpp @@ -8,8 +8,10 @@ namespace ox::buildinfo { +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-const-variable" +#endif #if defined(OX_USE_STDLIB) const bool UseStdLib = true; @@ -37,6 +39,8 @@ const bool BigEndian = false; const bool LittleEndian = true; #endif +#ifdef __clang__ #pragma clang diagnostic pop +#endif } diff --git a/deps/ox/src/ox/std/vector.hpp b/deps/ox/src/ox/std/vector.hpp index 8389ca51..a63d74ec 100644 --- a/deps/ox/src/ox/std/vector.hpp +++ b/deps/ox/src/ox/std/vector.hpp @@ -174,7 +174,7 @@ const T &Vector::back() const noexcept { template std::size_t Vector::size() const noexcept { return m_size; -}; +} template void Vector::resize(std::size_t size) noexcept {