Skip to content

Commit ba0b356

Browse files
scottfurrylucydodo
authored andcommitted
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
1 parent e0a000c commit ba0b356

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/sqlite.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33

44
#ifdef ENABLE_SQLCIPHER
55
#define SQLITE_TEMP_STORE 2
6-
#define SQLITE_HAS_CODEC
7-
#ifdef Q_OS_WIN32
8-
#include <sqlite3.h>
9-
#else
10-
#include <sqlcipher/sqlite3.h>
11-
#endif
6+
#ifndef SQLITE_HAS_CODEC
7+
#define SQLITE_HAS_CODEC
8+
#endif
9+
#ifdef Q_OS_WIN32
10+
#include <sqlite3.h>
11+
#else
12+
#include <sqlcipher/sqlite3.h>
13+
#endif
1214
#else
1315
#include <sqlite3.h>
1416
#endif
@@ -17,7 +19,7 @@
1719
// yet (which introduced in this commit: https://www.sqlite.org/src/info/5716fc2341ddd8cf), we
1820
// define it here with a value of 0. Because it is ORed with other constants a value of 0 is a no-op.
1921
#ifndef SQLITE_DETERMINISTIC
20-
#define SQLITE_DETERMINISTIC 0
22+
#define SQLITE_DETERMINISTIC 0
2123
#endif
2224

2325
#endif

0 commit comments

Comments
 (0)