Skip to content

Commit 69bbc8f

Browse files
committed
Allow building on MSVC by disabling a warning turned error.
In call to `sqlite3_exec` (line 726 originally) ``` database.c(726): error C4028: formal parameter 1 different from declaration database.c(726): warning C4022: 'sqlite3_exec': pointer mismatch for actual parameter 4 ```
1 parent 6fc5073 commit 69bbc8f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

ext/sqlite3/database.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#include <sqlite3_ruby.h>
22
#include <aggregator.h>
33

4+
#if _MSC_VER
5+
#pragma warning( push )
6+
#pragma warning( disable : 4028 )
7+
#endif
8+
49
#define REQUIRE_OPEN_DB(_ctxt) \
510
if(!_ctxt->db) \
611
rb_raise(rb_path2class("SQLite3::Exception"), "cannot use a closed database");
@@ -825,3 +830,7 @@ void init_sqlite3_database()
825830

826831
rb_sqlite3_aggregator_init();
827832
}
833+
834+
#if _MSC_VER
835+
#pragma warning( pop )
836+
#endif

0 commit comments

Comments
 (0)