From 7ee496b5f899723e51c9c76d6345bb72d8d4bcd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Thu, 30 Jan 2025 17:58:22 +0100 Subject: [PATCH] 2025-01-30 17:58 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/3rd/sqlite3/sqlite3.c * for GCC >= 14 builds added #pragma GCC diagnostic ignored "-Wstringop-overread" * contrib/3rd/sqlite3/sqlite3.hbp * removed -cflag=-Wno-stringop-overread used in all GCC builds when HB_BUILD_TEST='strict' * contrib/3rd/sqlite3/sqlite3.diff * regenerated --- ChangeLog.txt | 13 +++++++++++++ contrib/3rd/sqlite3/sqlite3.c | 4 ++++ contrib/3rd/sqlite3/sqlite3.diff | 28 ++++++++++++++++++++++++---- contrib/3rd/sqlite3/sqlite3.hbp | 4 ---- 4 files changed, 41 insertions(+), 8 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 781c83aa21..c6e8279b28 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -7,6 +7,19 @@ Entries may not always be in chronological/commit order. See license at the end of file. */ +2025-01-30 17:58 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * contrib/3rd/sqlite3/sqlite3.c + * for GCC >= 14 builds added + #pragma GCC diagnostic ignored "-Wstringop-overread" + + * contrib/3rd/sqlite3/sqlite3.hbp + * removed + -cflag=-Wno-stringop-overread + used in all GCC builds when HB_BUILD_TEST='strict' + + * contrib/3rd/sqlite3/sqlite3.diff + * regenerated + 2025-01-30 16:19 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/hbcurl/core.c ! casting diff --git a/contrib/3rd/sqlite3/sqlite3.c b/contrib/3rd/sqlite3/sqlite3.c index 1d84641e43..3af7f84d6b 100644 --- a/contrib/3rd/sqlite3/sqlite3.c +++ b/contrib/3rd/sqlite3/sqlite3.c @@ -120178,6 +120178,10 @@ SQLITE_PRIVATE void sqlite3AuthContextPop(AuthContext *pContext){ */ /* #include "sqliteInt.h" */ +#if defined( __GNUC__ ) && __GNUC__ >= 14 +# pragma GCC diagnostic ignored "-Wstringop-overread" +#endif + #ifndef SQLITE_OMIT_SHARED_CACHE /* ** The TableLock structure is only used by the sqlite3TableLock() and diff --git a/contrib/3rd/sqlite3/sqlite3.diff b/contrib/3rd/sqlite3/sqlite3.diff index b8ae6b4e60..efd5c200c5 100644 --- a/contrib/3rd/sqlite3/sqlite3.diff +++ b/contrib/3rd/sqlite3/sqlite3.diff @@ -1,11 +1,11 @@ --- sqlite3.orig/sqlite3.c 2024-02-12 21:32:10.804005193 +0100 -+++ sqlite3/sqlite3.c 2024-02-12 21:26:49.931101008 +0100 ++++ sqlite3/sqlite3.c 2025-01-30 17:42:00.624509041 +0100 @@ -13915,7 +13915,7 @@ ** Macros to hint to the compiler that a function should or should not be ** inlined. */ -#if defined(__GNUC__) -+#if defined(__GNUC__) && __GNUC__>=3 ++#if defined(__GNUC__) && (__GNUC__>=4 || (__GNUC__==3 && __GNUC_MINOR__>=1)) # define SQLITE_NOINLINE __attribute__((noinline)) # define SQLITE_INLINE __attribute__((always_inline)) inline #elif defined(_MSC_VER) && _MSC_VER>=1310 @@ -126,7 +126,18 @@ p->iReadOff += nAvail; nRem = nByte - nAvail; -@@ -129191,7 +129207,7 @@ +@@ -120162,6 +120178,10 @@ + */ + /* #include "sqliteInt.h" */ + ++#if defined( __GNUC__ ) && __GNUC__ >= 14 ++# pragma GCC diagnostic ignored "-Wstringop-overread" ++#endif ++ + #ifndef SQLITE_OMIT_SHARED_CACHE + /* + ** The TableLock structure is only used by the sqlite3TableLock() and +@@ -129191,7 +129211,7 @@ ** Add a (possibly large) integer to the running sum. */ static void kahanBabuskaNeumaierStepInt64(volatile SumCtx *pSum, i64 iVal){ @@ -135,7 +146,7 @@ i64 iBig, iSm; iSm = iVal % 16384; iBig = iVal - iSm; -@@ -129209,7 +129225,7 @@ +@@ -129209,7 +129229,7 @@ volatile SumCtx *p, i64 iVal ){ @@ -144,3 +155,12 @@ i64 iSm = iVal % 16384; p->rSum = (double)(iVal - iSm); p->rErr = (double)iSm; +@@ -203696,7 +203716,7 @@ + ** A macro to hint to the compiler that a function should not be + ** inlined. + */ +-#if defined(__GNUC__) ++#if defined(__GNUC__) && (__GNUC__>=4 || (__GNUC__==3 && __GNUC_MINOR__>=1)) + # define JSON_NOINLINE __attribute__((noinline)) + #elif defined(_MSC_VER) && _MSC_VER>=1310 + # define JSON_NOINLINE __declspec(noinline) diff --git a/contrib/3rd/sqlite3/sqlite3.hbp b/contrib/3rd/sqlite3/sqlite3.hbp index a7bcafcf24..048c17be39 100644 --- a/contrib/3rd/sqlite3/sqlite3.hbp +++ b/contrib/3rd/sqlite3/sqlite3.hbp @@ -42,10 +42,6 @@ # mingw 4.5.0/4.5.1 revisions fail compiling in iso90 mode. It's fixed in 4.5.2. -c=gnu90{allgcc&HB_COMP_VER='45'} -# GCC 14 reports strlen reading 1 or more bytes from a region of size 0 warning --cflag=-Wno-stringop-overread{allgcc&HB_BUILD_TEST='strict'} --cflag=-Wno-unknown-warning-option{(clang|(gcc&darwin))&HB_BUILD_TEST='strict'} - sqlite3.c # ORIGIN http://www.sqlite.org/