Skip to content

Commit c25ff86

Browse files
committed
Fix unused variable warning on Windows in rb_mysql_client_socket
1 parent ed746a1 commit c25ff86

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
@@ -881,14 +881,10 @@ static VALUE rb_mysql_client_server_info(VALUE self) {
881881
* Return the file descriptor number for this client.
882882
*/
883883
static VALUE rb_mysql_client_socket(VALUE self) {
884-
GET_CLIENT(self);
885884
#ifndef _WIN32
886-
{
887-
int fd_set_fd;
888-
REQUIRE_CONNECTED(wrapper);
889-
fd_set_fd = wrapper->client->net.fd;
890-
return INT2NUM(fd_set_fd);
891-
}
885+
GET_CLIENT(self);
886+
REQUIRE_CONNECTED(wrapper);
887+
return INT2NUM(wrapper->client->net.fd);
892888
#else
893889
rb_raise(cMysql2Error, "Raw access to the mysql file descriptor isn't supported on Windows");
894890
#endif

0 commit comments

Comments
 (0)