diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2019-06-03 20:34:14 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2019-06-05 16:24:38 +0300 |
commit | 7bb56f5ca6e2ecba73b5caa3c8de4fc659b7290d (patch) | |
tree | 1efe322c978e857165ff4c70c9a2056f2eec928f /plugins/Dbx_sqlite | |
parent | e4c90e5aa410542dd64858ad6fd0fcaa88d035a5 (diff) |
dbx_sqlite: silenced few warnings
Diffstat (limited to 'plugins/Dbx_sqlite')
-rwxr-xr-x | plugins/Dbx_sqlite/src/dbevents.cpp | 10 | ||||
-rwxr-xr-x[-rw-r--r--] | plugins/Dbx_sqlite/src/dbsettings.cpp | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp index 1519b0c5e8..192006e6e1 100755 --- a/plugins/Dbx_sqlite/src/dbevents.cpp +++ b/plugins/Dbx_sqlite/src/dbevents.cpp @@ -167,7 +167,7 @@ MEVENT CDbxSQLite::AddEvent(MCONTACT hContact, DBEVENTINFO *dbei) mir_cslock lock(m_csDbAccess); sqlite3_stmt *stmt = evt_stmts_prep[SQL_EVT_STMT_ADDEVENT]; sqlite3_bind_int64(stmt, 1, hContact); - sqlite3_bind_text(stmt, 2, dbei->szModule, mir_strlen(dbei->szModule), nullptr); + sqlite3_bind_text(stmt, 2, dbei->szModule, (int)mir_strlen(dbei->szModule), nullptr); sqlite3_bind_int64(stmt, 3, dbei->timestamp); sqlite3_bind_int(stmt, 4, dbei->eventType); sqlite3_bind_int64(stmt, 5, dbei->flags); @@ -268,7 +268,7 @@ BOOL CDbxSQLite::EditEvent(MCONTACT hContact, MEVENT hDbEvent, DBEVENTINFO *dbei { mir_cslock lock(m_csDbAccess); sqlite3_stmt *stmt = evt_stmts_prep[SQL_EVT_STMT_EDIT]; - sqlite3_bind_text(stmt, 1, dbei->szModule, mir_strlen(dbei->szModule), nullptr); + sqlite3_bind_text(stmt, 1, dbei->szModule, (int)mir_strlen(dbei->szModule), nullptr); sqlite3_bind_int64(stmt, 2, dbei->timestamp); sqlite3_bind_int(stmt, 3, dbei->eventType); sqlite3_bind_int64(stmt, 4, dbei->flags); @@ -699,8 +699,8 @@ MEVENT CDbxSQLite::GetEventById(LPCSTR szModule, LPCSTR szId) mir_cslock lock(m_csDbAccess); sqlite3_stmt *stmt = evt_stmts_prep[SQL_EVT_STMT_GETIDBYSRVID]; - sqlite3_bind_text(stmt, 1, szModule, mir_strlen(szModule), nullptr); - sqlite3_bind_text(stmt, 2, szId, mir_strlen(szId), nullptr); + sqlite3_bind_text(stmt, 1, szModule, (int)mir_strlen(szModule), nullptr); + sqlite3_bind_text(stmt, 2, szId, (int)mir_strlen(szId), nullptr); int rc = sqlite3_step(stmt); assert(rc == SQLITE_ROW || rc == SQLITE_DONE); if (rc != SQLITE_ROW) { @@ -719,7 +719,7 @@ BOOL CDbxSQLite::SetEventId(LPCSTR, MEVENT hDbEvent, LPCSTR szId) mir_cslock lock(m_csDbAccess); sqlite3_stmt *stmt = evt_stmts_prep[SQL_EVT_STMT_SETSRVID]; - sqlite3_bind_text(stmt, 1, szId, mir_strlen(szId), nullptr); + sqlite3_bind_text(stmt, 1, szId, (int)mir_strlen(szId), nullptr); sqlite3_bind_int64(stmt, 2, hDbEvent); int rc = sqlite3_step(stmt); assert(rc == SQLITE_ROW || rc == SQLITE_DONE); diff --git a/plugins/Dbx_sqlite/src/dbsettings.cpp b/plugins/Dbx_sqlite/src/dbsettings.cpp index 964226ba9a..fcd2281ddd 100644..100755 --- a/plugins/Dbx_sqlite/src/dbsettings.cpp +++ b/plugins/Dbx_sqlite/src/dbsettings.cpp @@ -117,8 +117,8 @@ LBL_Seek: sqlite3_stmt *stmt = settings_stmts_prep[SQL_SET_STMT_GET]; sqlite3_bind_int64(stmt, 1, hContact); - sqlite3_bind_text(stmt, 2, szModule, mir_strlen(szModule), nullptr); - sqlite3_bind_text(stmt, 3, szSetting, mir_strlen(szSetting), nullptr); + sqlite3_bind_text(stmt, 2, szModule, (int)mir_strlen(szModule), nullptr); + sqlite3_bind_text(stmt, 3, szSetting, (int)mir_strlen(szSetting), nullptr); int rc = sqlite3_step(stmt); assert(rc == SQLITE_ROW || rc == SQLITE_DONE); if (rc != SQLITE_ROW) { @@ -254,8 +254,8 @@ BOOL CDbxSQLite::WriteContactSetting(MCONTACT hContact, DBCONTACTWRITESETTING *d sqlite3_stmt *stmt = settings_stmts_prep[SQL_SET_STMT_REPLACE]; sqlite3_bind_int64(stmt, 1, hContact); - sqlite3_bind_text(stmt, 2, dbcwWork.szModule, mir_strlen(dbcwWork.szModule), nullptr); - sqlite3_bind_text(stmt, 3, dbcwWork.szSetting, mir_strlen(dbcwWork.szSetting), nullptr); + sqlite3_bind_text(stmt, 2, dbcwWork.szModule, (int)mir_strlen(dbcwWork.szModule), nullptr); + sqlite3_bind_text(stmt, 3, dbcwWork.szSetting, (int)mir_strlen(dbcwWork.szSetting), nullptr); sqlite3_bind_int(stmt, 4, dbcwWork.value.type); switch (dbcwWork.value.type) { case DBVT_BYTE: @@ -304,8 +304,8 @@ BOOL CDbxSQLite::DeleteContactSetting(MCONTACT hContact, LPCSTR szModule, LPCSTR mir_cslock lock(m_csDbAccess); sqlite3_stmt *stmt = settings_stmts_prep[SQL_SET_STMT_DELETE]; sqlite3_bind_int64(stmt, 1, hContact); - sqlite3_bind_text(stmt, 2, szModule, mir_strlen(szModule), nullptr); - sqlite3_bind_text(stmt, 3, szSetting, mir_strlen(szSetting), nullptr); + sqlite3_bind_text(stmt, 2, szModule, (int)mir_strlen(szModule), nullptr); + sqlite3_bind_text(stmt, 3, szSetting, (int)mir_strlen(szSetting), nullptr); int rc = sqlite3_step(stmt); assert(rc == SQLITE_DONE); sqlite3_reset(stmt); @@ -345,7 +345,7 @@ BOOL CDbxSQLite::EnumContactSettings(MCONTACT hContact, DBSETTINGENUMPROC pfnEnu mir_cslock lock(m_csDbAccess); sqlite3_stmt *stmt = settings_stmts_prep[SQL_SET_STMT_ENUMMODULE]; sqlite3_bind_int64(stmt, 1, hContact); - sqlite3_bind_text(stmt, 2, szModule, mir_strlen(szModule), nullptr); + sqlite3_bind_text(stmt, 2, szModule, (int)mir_strlen(szModule), nullptr); int rc = 0; while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) { const char *value = (const char*)sqlite3_column_text(stmt, 0); |