connectivity/source/manager/mdrivermanager.cxx | 4 +-- external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk | 1 external/mariadb-connector-c/c23.patch.0 | 11 +++++++++ vcl/source/window/layout.cxx | 12 +++++----- 4 files changed, 20 insertions(+), 8 deletions(-)
New commits: commit b1997e3ce419264d83a736a556f2b689a8ffcc10 Author: Stephan Bergmann <[email protected]> AuthorDate: Wed Sep 11 20:22:25 2024 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Tue Oct 28 13:18:15 2025 +0100 These bogus -Wdangling-reference still hit with current GCC 15 trunk Change-Id: Ice2be2156474cf486ad1c461d65e2711ebf43d2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173232 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 294b4cc5458b9e20da98d12405a5942ae1551aee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193031 Reviewed-by: Michael Stahl <[email protected]> Tested-by: allotropia jenkins <[email protected]> diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index 61b5b528f624..3d9754867bf7 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -565,12 +565,12 @@ Reference< XDriver > OSDBCDriverManager::implGetDriverForURL(const OUString& _rU m_aDriversBS.end(), // end of search range [&_rURL, this] (const DriverAccessArray::value_type& driverAccess) { // extract the driver from the access, then ask the resulting driver for acceptance -#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14 +#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdangling-reference" #endif const DriverAccess& ensuredAccess = EnsureDriver(m_xContext)(driverAccess); -#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14 +#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15 #pragma GCC diagnostic pop #endif const Reference<XDriver> driver = ExtractDriverFromAccess()(ensuredAccess); diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 2d42d305498e..baf138e64ec7 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -964,12 +964,12 @@ static array_type assembleGrid(const VclGrid &rGrid) { for (sal_Int32 y = 0; y < nMaxY; ++y) { -#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14 +#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdangling-reference" #endif const GridEntry &rEntry = A[x][y]; -#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14 +#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15 #pragma GCC diagnostic pop #endif const vcl::Window *pChild = rEntry.pChild; @@ -1101,7 +1101,7 @@ static void calcMaxs(const array_type &A, std::vector<VclGrid::Value> &rWidths, { for (sal_Int32 y = 0; y < nMaxY; ++y) { -#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14 +#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdangling-reference" #elif defined _MSC_VER @@ -1109,7 +1109,7 @@ static void calcMaxs(const array_type &A, std::vector<VclGrid::Value> &rWidths, #pragma warning(disable : 4459) #endif const GridEntry &rEntry = A[x][y]; -#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14 +#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15 #pragma GCC diagnostic pop #elif defined _MSC_VER #pragma warning(pop) @@ -1144,12 +1144,12 @@ static void calcMaxs(const array_type &A, std::vector<VclGrid::Value> &rWidths, { for (sal_Int32 y = 0; y < nMaxY; ++y) { -#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14 +#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdangling-reference" #endif const GridEntry &rEntry = A[x][y]; -#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 14 +#if defined __GNUC__ && !defined __clang__ && __GNUC__ >= 13 && __GNUC__ <= 15 #pragma GCC diagnostic pop #endif const vcl::Window *pChild = rEntry.pChild; commit afb8de5dc3c3a8ad1d84d0116ef621fbc8eff64d Author: Stephan Bergmann <[email protected]> AuthorDate: Mon Nov 25 14:04:12 2024 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Tue Oct 28 13:18:03 2025 +0100 GCC 15 trunk now defaults to C23, where bool is a keyword ...so the existing C code started to fail with > In file included from workdir/UnpackedTarball/mariadb-connector-c/libmariadb/ma_alloc.c:20: > workdir/UnpackedTarball/mariadb-connector-c/include/ma_global.h:687:25: error: two or more data types in declaration specifiers > 687 | typedef char bool; /* Ordinary boolean values 0 1 */ > | ^~~~ (And the !defined(HAVE_BOOL) there, always being true, apparently started to get in the way now and thus needed to be removed, whatever its original purpose.) Change-Id: I781458d643e01a7199e19a178da3a32520d16b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177260 Reviewed-by: Stephan Bergmann <[email protected]> Tested-by: Jenkins (cherry picked from commit ac2b3c339ee47497365066754e9937aba2cca700) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193030 Tested-by: Michael Stahl <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk index dbce7aec4bdd..3ba6bfef583f 100644 --- a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk +++ b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk @@ -27,6 +27,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,mariadb-connector-c,1)) $(eval $(call gb_UnpackedTarball_add_patches,mariadb-connector-c,\ external/mariadb-connector-c/clang-cl.patch.0 \ + external/mariadb-connector-c/c23.patch.0 \ )) # TODO are any "plugins" needed? diff --git a/external/mariadb-connector-c/c23.patch.0 b/external/mariadb-connector-c/c23.patch.0 new file mode 100644 index 000000000000..d19d6be4cdae --- /dev/null +++ b/external/mariadb-connector-c/c23.patch.0 @@ -0,0 +1,11 @@ +--- include/ma_global.h ++++ include/ma_global.h +@@ -683,7 +683,7 @@ + typedef int myf; /* Type of MyFlags in my_funcs */ + typedef char my_bool; /* Small bool */ + typedef unsigned long long my_ulonglong; +-#if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus)) ++#if !defined(bool) && !defined(bool_defined) && !(defined(__cplusplus) || __STDC_VERSION__ >= 202311L) + typedef char bool; /* Ordinary boolean values 0 1 */ + #endif + /* Macros for converting *constants* to the right type */
