Skip to content

Commit 6615449

Browse files
committed
Merge pull request #426 from tadd/fix-warning-2
Fix warning again
2 parents 14975dc + 5096776 commit 6615449

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/mysql2/client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static VALUE rb_connect(VALUE self, VALUE user, VALUE pass, VALUE host, VALUE po
286286

287287
args.host = NIL_P(host) ? NULL : StringValuePtr(host);
288288
args.unix_socket = NIL_P(socket) ? NULL : StringValuePtr(socket);
289-
args.port = NIL_P(port) ? NULL : NUM2INT(port);
289+
args.port = NIL_P(port) ? 0 : NUM2INT(port);
290290
args.user = NIL_P(user) ? NULL : StringValuePtr(user);
291291
args.passwd = NIL_P(pass) ? NULL : StringValuePtr(pass);
292292
args.db = NIL_P(database) ? NULL : StringValuePtr(database);
@@ -680,7 +680,7 @@ static VALUE rb_mysql_client_real_escape(VALUE self, VALUE str) {
680680

681681
static VALUE _mysql_client_options(VALUE self, int opt, VALUE value) {
682682
int result;
683-
void *retval = NULL;
683+
const void *retval = NULL;
684684
unsigned int intval = 0;
685685
const char * charval = NULL;
686686
my_bool boolval;

0 commit comments

Comments
 (0)