aboutsummaryrefslogtreecommitdiffstats
path: root/src/dblayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dblayer.c')
-rw-r--r--src/dblayer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dblayer.c b/src/dblayer.c
index 8703c1e..acdf339 100644
--- a/src/dblayer.c
+++ b/src/dblayer.c
@@ -41,7 +41,7 @@ int check_initialized_DB(sqlite3 *db) {
dbh_form_query_select_all_tables(sql);
sqlite3_stmt *stmt;
- sqlite3_prepare_v2(db, sql, strlen(sql), &stmt, NULL);
+ sqlite3_prepare_v2(db, sql, (int)strlen(sql), &stmt, NULL);
int program_table_ok, config_table_ok, rel_table_ok = 0;
while (sqlite3_step(stmt) != SQLITE_DONE) {
@@ -135,7 +135,7 @@ int get_next_valid_id_from_table(DB *db, const char* tableName) {
if (rc != SQLITE_OK) {
return -1;
}
- sqlite3_bind_text(stmt, 1, tableName, strlen(tableName), 0);
+ sqlite3_bind_text(stmt, 1, tableName, (int)strlen(tableName), 0);
int id = 0;
while (sqlite3_step(stmt) == SQLITE_ROW) {
@@ -168,7 +168,7 @@ int insert_to_program_table(DB *db, const char *name) {
return -1;
}
sqlite3_bind_int(stmt, 1, id);
- sqlite3_bind_text(stmt, 2, name, strlen(name), 0);
+ sqlite3_bind_text(stmt, 2, name, (int)strlen(name), 0);
if (sqlite3_step(stmt) != SQLITE_DONE) {
PRINT_ERR("while excecuting insert to program sql.");
db->error = SQL_ERR_SQLITE;
@@ -196,7 +196,7 @@ int insert_to_config_table(DB *db, const char *path, const int secret, const int
return -1;
}
sqlite3_bind_int(stmt, 1, id);
- sqlite3_bind_text(stmt, 2, path, strlen(path), 0);
+ sqlite3_bind_text(stmt, 2, path, (int)strlen(path), 0);
sqlite3_bind_int(stmt, 3, secret);
sqlite3_bind_int(stmt, 4, prime);
if (sqlite3_step(stmt) != SQLITE_DONE) {
@@ -245,7 +245,7 @@ int get_program_id(DB *db, const char* name) {
PRINT_ERR("Error while preparing get_program_id sql.");
return -2;
}
- sqlite3_bind_text(stmt, 1, name, strlen(name), 0);
+ sqlite3_bind_text(stmt, 1, name, (int)strlen(name), 0);
int id = -1;
while (sqlite3_step(stmt) == SQLITE_ROW) {
id = sqlite3_column_int(stmt, 0);
@@ -274,7 +274,7 @@ int get_config_id(DB *db, const char* path) {
PRINT_ERR("while preparing get_config_id sql.");
return -2;
}
- sqlite3_bind_text(stmt, 1, path, strlen(path), 0);
+ sqlite3_bind_text(stmt, 1, path, (int)strlen(path), 0);
int id = -1;
while (sqlite3_step(stmt) == SQLITE_ROW) {
id = sqlite3_column_int(stmt, 0);