Skip to content

Commit 5e6ef45

Browse files
authored
Merge pull request #413 Fix compiler warnings warning from ninjaoflight/fix-visibility-warning
2 parents 39070b2 + da2c747 commit 5e6ef45

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

include/SQLiteCpp/SQLiteCppExport.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@
2121
#if defined(_WIN32)&& !defined(__GNUC__) && defined(SQLITECPP_COMPILE_DLL)
2222
#if SQLITECPP_DLL_EXPORT
2323
#define SQLITECPP_API __declspec(dllexport)
24-
#pragma message("Exporting symbols")
2524
#else
2625
#define SQLITECPP_API __declspec(dllimport)
27-
#pragma message("Importing symbols")
2826
#endif
2927
#else
3028
#if __GNUC__ >= 4

meson.build

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,14 @@ if get_option('SQLITECPP_USE_STACK_PROTECTION')
148148
message('warning: SQLiteCpp does not support stack protection on MinGW-W64')
149149
message('warning: this could lead to a crash on the application')
150150
message('warning: you can disable this warning by setting SQLITECPP_USE_STACK_PROTECTOR to false')
151-
else
151+
## check if it is supported by the compiler
152+
elif cxx.has_argument('-fstack-protector')
152153
sqlitecpp_args += ['-fstack-protector']
154+
## if not supported give a warning
155+
else
156+
message('warning: SQLiteCpp does not have stack protection support in this compiler')
157+
message('warning: this argument will be ignored')
158+
message('warning: you can disable this warning by setting SQLITECPP_USE_STACK_PROTECTOR to false')
153159
endif
154160
endif
155161

src/Column.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
namespace SQLite
1919
{
2020

21-
SQLITECPP_API const int INTEGER = SQLITE_INTEGER;
22-
SQLITECPP_API const int FLOAT = SQLITE_FLOAT;
23-
SQLITECPP_API const int TEXT = SQLITE_TEXT;
24-
SQLITECPP_API const int BLOB = SQLITE_BLOB;
25-
SQLITECPP_API const int Null = SQLITE_NULL;
21+
const int INTEGER = SQLITE_INTEGER;
22+
const int FLOAT = SQLITE_FLOAT;
23+
const int TEXT = SQLITE_TEXT;
24+
const int BLOB = SQLITE_BLOB;
25+
const int Null = SQLITE_NULL;
2626

2727

2828
// Encapsulation of a Column in a row of the result pointed by the prepared Statement.

src/Database.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,25 @@
2626
namespace SQLite
2727
{
2828

29-
SQLITECPP_API const int OK = SQLITE_OK;
30-
SQLITECPP_API const int OPEN_READONLY = SQLITE_OPEN_READONLY;
31-
SQLITECPP_API const int OPEN_READWRITE = SQLITE_OPEN_READWRITE;
32-
SQLITECPP_API const int OPEN_CREATE = SQLITE_OPEN_CREATE;
33-
SQLITECPP_API const int OPEN_URI = SQLITE_OPEN_URI;
34-
SQLITECPP_API const int OPEN_MEMORY = SQLITE_OPEN_MEMORY;
35-
SQLITECPP_API const int OPEN_NOMUTEX = SQLITE_OPEN_NOMUTEX;
36-
SQLITECPP_API const int OPEN_FULLMUTEX = SQLITE_OPEN_FULLMUTEX;
37-
SQLITECPP_API const int OPEN_SHAREDCACHE = SQLITE_OPEN_SHAREDCACHE;
38-
SQLITECPP_API const int OPEN_PRIVATECACHE = SQLITE_OPEN_PRIVATECACHE;
29+
const int OK = SQLITE_OK;
30+
const int OPEN_READONLY = SQLITE_OPEN_READONLY;
31+
const int OPEN_READWRITE = SQLITE_OPEN_READWRITE;
32+
const int OPEN_CREATE = SQLITE_OPEN_CREATE;
33+
const int OPEN_URI = SQLITE_OPEN_URI;
34+
const int OPEN_MEMORY = SQLITE_OPEN_MEMORY;
35+
const int OPEN_NOMUTEX = SQLITE_OPEN_NOMUTEX;
36+
const int OPEN_FULLMUTEX = SQLITE_OPEN_FULLMUTEX;
37+
const int OPEN_SHAREDCACHE = SQLITE_OPEN_SHAREDCACHE;
38+
const int OPEN_PRIVATECACHE = SQLITE_OPEN_PRIVATECACHE;
3939
// check if sqlite version is >= 3.31.0 and SQLITE_OPEN_NOFOLLOW is defined
4040
#if SQLITE_VERSION_NUMBER >= 3031000 && defined(SQLITE_OPEN_NOFOLLOW)
41-
SQLITECPP_API const int OPEN_NOFOLLOW = SQLITE_OPEN_NOFOLLOW;
41+
const int OPEN_NOFOLLOW = SQLITE_OPEN_NOFOLLOW;
4242
#else
43-
SQLITECPP_API const int OPEN_NOFOLLOW = 0;
43+
const int OPEN_NOFOLLOW = 0;
4444
#endif
4545

46-
SQLITECPP_API const char* const VERSION = SQLITE_VERSION;
47-
SQLITECPP_API const int VERSION_NUMBER = SQLITE_VERSION_NUMBER;
46+
const char* const VERSION = SQLITE_VERSION;
47+
const int VERSION_NUMBER = SQLITE_VERSION_NUMBER;
4848

4949
// Return SQLite version string using runtime call to the compiled library
5050
const char* getLibVersion() noexcept

0 commit comments

Comments
 (0)