From 0921ed79cd3b9ec2f5f4b6c12190a1d6b7a3312e Mon Sep 17 00:00:00 2001 From: glx22 Date: Fri, 20 Dec 2024 00:10:50 +0100 Subject: [PATCH 1/3] Test: gcc-14 --- .github/workflows/ci-build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 8805550968f24..c049de64eb45a 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -30,9 +30,10 @@ jobs: cxxcompiler: clang++ libraries: libsdl2-dev - name: GCC - SDL2 - compiler: gcc - cxxcompiler: g++ + compiler: gcc-14 + cxxcompiler: g++-14 libraries: libsdl2-dev + extra-cmake-parameters: -DCMAKE_BUILD_TYPE=RelWithDebInfo - name: GCC - Dedicated compiler: gcc cxxcompiler: g++ From 4494d0396051603dde4d7e6ffef07674266c67d7 Mon Sep 17 00:00:00 2001 From: glx22 Date: Fri, 27 Dec 2024 15:08:00 +0100 Subject: [PATCH 2/3] Codefix: silence [maybe-]uninitialized warnings for Pool::PoolItem::operator delete() --- src/core/pool_type.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/pool_type.hpp b/src/core/pool_type.hpp index fb0e822ac3f8e..0db37d93fe3fb 100644 --- a/src/core/pool_type.hpp +++ b/src/core/pool_type.hpp @@ -256,6 +256,7 @@ struct Pool : PoolBase { * @param p memory to free * @note the item has to be allocated in the pool! */ + IGNORE_UNINITIALIZED_WARNING_START inline void operator delete(void *p) { if (p == nullptr) return; @@ -263,6 +264,7 @@ struct Pool : PoolBase { assert(pn == Tpool->Get(pn->index)); Tpool->FreeItem(pn->index); } + IGNORE_UNINITIALIZED_WARNING_STOP /** * Allocates space for new Titem with given index From cd27273191883554d187821f2d6a779ce5ffbdee Mon Sep 17 00:00:00 2001 From: glx22 Date: Fri, 27 Dec 2024 15:08:42 +0100 Subject: [PATCH 3/3] Codefix: silence [maybe-]uninitialized warnings for FileHandle class --- src/fileio_type.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fileio_type.h b/src/fileio_type.h index a8c3469f0fe09..3e9d0ed315996 100644 --- a/src/fileio_type.h +++ b/src/fileio_type.h @@ -155,6 +155,7 @@ enum Searchpath : unsigned { DECLARE_POSTFIX_INCREMENT(Searchpath) +IGNORE_UNINITIALIZED_WARNING_START class FileHandle { public: static std::optional Open(const std::string &filename, const std::string &mode); @@ -180,6 +181,7 @@ class FileHandle { FileHandle(FILE *f) : f(f) { assert(this->f != nullptr); } }; +IGNORE_UNINITIALIZED_WARNING_STOP /* Ensure has_value() is used consistently. */ template <> constexpr std::optional::operator bool() const noexcept = delete;