Fixed the 3 warnings specifis to 64 bits GCC build

- warnings revealed by issue 3
 - but also shown by Travis CI builds
This commit is contained in:
Sébastien Rombauts 2013-09-15 23:02:29 +02:00
parent ec3b042bf5
commit 466504aadb
3 changed files with 5 additions and 5 deletions

View File

@ -121,7 +121,7 @@ ctest . # make test
This project is continuously tested under Ubuntu Linux with the gcc and clang compilers
using the Travis CI community service with the above CMake building and testing procedure.
Matrix of results can be seen online: https://travis-ci.org/SRombauts/SQLiteCpp
Detailed results can be seen online: https://travis-ci.org/SRombauts/SQLiteCpp
### License

View File

@ -291,7 +291,7 @@ int main (void)
{
char buffer[16*1024];
void* blob = &buffer;
size_t size = fread(blob, 1, 16*1024, fp);
int size = static_cast<int>(fread(blob, 1, 16*1024, fp));
buffer[size] = '\0';
fclose (fp);
std::cout << "blob size=" << size << " :\n";

View File

@ -66,7 +66,7 @@ void Statement::bind(const int aIndex, const double& aValue) // throw(SQLite::Ex
// Bind a string value to a parameter "?", "?NNN", ":VVV", "@VVV" or "$VVV" in the SQL prepared statement
void Statement::bind(const int aIndex, const std::string& aValue) // throw(SQLite::Exception)
{
int ret = sqlite3_bind_text(mStmtPtr, aIndex, aValue.c_str(), aValue.size(), SQLITE_TRANSIENT);
int ret = sqlite3_bind_text(mStmtPtr, aIndex, aValue.c_str(), static_cast<int>(aValue.size()), SQLITE_TRANSIENT);
check(ret);
}
@ -120,7 +120,7 @@ void Statement::bind(const char* apName, const double& aValue) // throw(SQLite::
void Statement::bind(const char* apName, const std::string& aValue) // throw(SQLite::Exception)
{
int index = sqlite3_bind_parameter_index(mStmtPtr, apName);
int ret = sqlite3_bind_text(mStmtPtr, index, aValue.c_str(), aValue.size(), SQLITE_TRANSIENT);
int ret = sqlite3_bind_text(mStmtPtr, index, aValue.c_str(), static_cast<int>(aValue.size()), SQLITE_TRANSIENT);
check(ret);
}
@ -269,7 +269,7 @@ Statement::Ptr::Ptr(sqlite3* apSQLite, std::string& aQuery) :
mpStmt(NULL),
mpRefCount(NULL)
{
int ret = sqlite3_prepare_v2(apSQLite, aQuery.c_str(), aQuery.size(), &mpStmt, NULL);
int ret = sqlite3_prepare_v2(apSQLite, aQuery.c_str(), static_cast<int>(aQuery.size()), &mpStmt, NULL);
if (SQLITE_OK != ret)
{
throw SQLite::Exception(sqlite3_errmsg(mpSQLite));