Skip to content

Commit c93aaf8

Browse files
committed
Fix unused variable warning on Windows in rb_mysql_client_socket
1 parent 1892313 commit c93aaf8

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

ext/mysql2/client.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -907,14 +907,10 @@ static VALUE rb_mysql_client_server_info(VALUE self) {
907907
* Return the file descriptor number for this client.
908908
*/
909909
static VALUE rb_mysql_client_socket(VALUE self) {
910-
GET_CLIENT(self);
911910
#ifndef _WIN32
912-
{
913-
int fd_set_fd;
914-
REQUIRE_CONNECTED(wrapper);
915-
fd_set_fd = wrapper->client->net.fd;
916-
return INT2NUM(fd_set_fd);
917-
}
911+
GET_CLIENT(self);
912+
REQUIRE_CONNECTED(wrapper);
913+
return INT2NUM(wrapper->client->net.fd);
918914
#else
919915
rb_raise(cMysql2Error, "Raw access to the mysql file descriptor isn't supported on Windows");
920916
#endif

0 commit comments

Comments
 (0)