Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning cleanup under MSVC and Clang #134

Merged
merged 3 commits into from
Aug 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ void Database::createFunction(const char* apFuncName,
void Database::loadExtension(const char* apExtensionName, const char *apEntryPointName)
{
#ifdef SQLITE_OMIT_LOAD_EXTENSION
// Unused
(void)apExtensionName;
(void)apEntryPointName;

throw std::runtime_error("sqlite extensions are disabled");
#else
#ifdef SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION // Since SQLite 3.13 (2016-05-18):
Expand All @@ -232,7 +236,7 @@ void Database::loadExtension(const char* apExtensionName, const char *apEntryPoi
// Set the key for the current sqlite database instance.
void Database::key(const std::string& aKey) const
{
int pass_len = aKey.length();
int pass_len = static_cast<int>(aKey.length());
#ifdef SQLITE_HAS_CODEC
if (pass_len > 0) {
const int ret = sqlite3_key(mpSQLite, aKey.c_str(), pass_len);
Expand Down