Skip to content

Commit abdbfd5

Browse files
committed
ext(warnings): quash more compiler warnings
1 parent 92e2550 commit abdbfd5

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

ext/sqlite3/database.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,17 @@ static VALUE sqlite3_rb_close(VALUE self);
4040
static VALUE rb_sqlite3_open_v2(VALUE self, VALUE file, VALUE mode, VALUE zvfs)
4141
{
4242
sqlite3RubyPtr ctx;
43-
VALUE flags;
4443
int status;
4544

4645
Data_Get_Struct(self, sqlite3Ruby, ctx);
4746

4847
#if defined TAINTING_SUPPORT
49-
#if defined StringValueCStr
48+
# if defined StringValueCStr
5049
StringValuePtr(file);
5150
rb_check_safe_obj(file);
52-
#else
51+
# else
5352
Check_SafeStr(file);
54-
#endif
53+
# endif
5554
#endif
5655

5756
status = sqlite3_open_v2(
@@ -745,9 +744,9 @@ static VALUE exec_batch(VALUE self, VALUE sql, VALUE results_as_hash)
745744
REQUIRE_OPEN_DB(ctx);
746745

747746
if(results_as_hash == Qtrue) {
748-
status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg);
747+
status = sqlite3_exec(ctx->db, StringValuePtr(sql), (sqlite3_callback)hash_callback_function, (void*)callback_ary, &errMsg);
749748
} else {
750-
status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg);
749+
status = sqlite3_exec(ctx->db, StringValuePtr(sql), (sqlite3_callback)regular_callback_function, (void*)callback_ary, &errMsg);
751750
}
752751

753752
if (status != SQLITE_OK)

0 commit comments

Comments
 (0)