Skip to content

Commit

Permalink
lib/srdb1: cast types to get rid of compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Oct 1, 2018
1 parent 7c64387 commit 202f4b1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lib/srdb1/db.c
Expand Up @@ -445,14 +445,17 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection, const str* tab
* Check the table version
* 0 means ok, -1 means an error occurred
*/
int db_check_table_version(db_func_t* dbf, db1_con_t* dbh, const str* table, const unsigned int version)
int db_check_table_version(db_func_t* dbf, db1_con_t* dbh, const str* table,
const unsigned int version)
{
int ver = db_table_version(dbf, dbh, table);
if (ver < 0) {
LM_ERR("querying version for table %.*s\n", table->len, table->s);
return -1;
} else if (ver != version) {
LM_ERR("invalid version %d for table %.*s found, expected %d (check table structure and table \"version\")\n", ver, table->len, table->s, version);
} else if (ver != (int)version) {
LM_ERR("invalid version %d for table %.*s found, expected %u"
" (check table structure and table \"version\")\n",
ver, table->len, table->s, version);
return -1;
}
return 0;
Expand Down

0 comments on commit 202f4b1

Please sign in to comment.