From 1c318b443f5c6b3a407b6c479bfca0a34e2137e1 Mon Sep 17 00:00:00 2001 From: Scott Furry Date: Sun, 2 Jul 2023 03:23:48 -0600 Subject: [PATCH] Silence SQLITE_HAS_CODEC Redefinition Warnings During compiling of source, compiler will issue numerous warnings stating that `SQLITE_HAS_CODEC` is being redefined. Commit resolves this warning by placing a ifndef pragma around declaration in header --- src/sqlite.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/sqlite.h b/src/sqlite.h index 335b0696..f6a9b3b9 100644 --- a/src/sqlite.h +++ b/src/sqlite.h @@ -3,12 +3,14 @@ #ifdef ENABLE_SQLCIPHER #define SQLITE_TEMP_STORE 2 - #define SQLITE_HAS_CODEC -#ifdef Q_OS_WIN32 - #include -#else - #include -#endif + #ifndef SQLITE_HAS_CODEC + #define SQLITE_HAS_CODEC + #endif + #ifdef Q_OS_WIN32 + #include + #else + #include + #endif #else #include #endif @@ -17,7 +19,7 @@ // yet (which introduced in this commit: https://www.sqlite.org/src/info/5716fc2341ddd8cf), we // define it here with a value of 0. Because it is ORed with other constants a value of 0 is a no-op. #ifndef SQLITE_DETERMINISTIC -#define SQLITE_DETERMINISTIC 0 + #define SQLITE_DETERMINISTIC 0 #endif #endif