From 1d2bc5c99e27ad5df77927a95e7757244bef0c02 Mon Sep 17 00:00:00 2001 From: Paul Kulchenko Date: Tue, 22 Nov 2022 20:43:04 -0800 Subject: [PATCH] Fix gnuc/llvm warnings for SQLite (reapply 5144c221) --- third_party/sqlite3/btree.c | 6 ++++++ third_party/sqlite3/sqlite3session.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/third_party/sqlite3/btree.c b/third_party/sqlite3/btree.c index 5f7085460..6ab963e3e 100644 --- a/third_party/sqlite3/btree.c +++ b/third_party/sqlite3/btree.c @@ -15,6 +15,12 @@ */ #include "third_party/sqlite3/btreeInt.h" +#if defined(__GNUC__) && !defined(__llvm__) +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + +/* clang-format off */ + /* ** The header string that appears at the beginning of every ** SQLite database. diff --git a/third_party/sqlite3/sqlite3session.c b/third_party/sqlite3/sqlite3session.c index e52ab4e68..f2492c084 100644 --- a/third_party/sqlite3/sqlite3session.c +++ b/third_party/sqlite3/sqlite3session.c @@ -1,9 +1,14 @@ +/* clang-format off */ #if defined(SQLITE_ENABLE_SESSION) && defined(SQLITE_ENABLE_PREUPDATE_HOOK) #include "third_party/sqlite3/sqlite3session.h" #include "libc/assert.h" #include "libc/str/str.h" +#if defined(__GNUC__) && !defined(__llvm__) +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + #ifndef SQLITE_AMALGAMATION # include "third_party/sqlite3/sqliteInt.h" # include "third_party/sqlite3/vdbeInt.h"