Remove warnings on WIN32

This commit is contained in:
Zhi Guan
2022-12-28 23:37:30 +08:00
parent cdebed562a
commit 70f6a42561
12 changed files with 116 additions and 50 deletions

View File

@@ -142,7 +142,10 @@ bad:
FD_ZERO(&fds);
FD_SET(conn.sock, &fds);
#ifdef WIN32
#else
FD_SET(fileno(stdin), &fds);
#endif
if (select((int)(conn.sock + 1), &fds, NULL, NULL, NULL) < 0) {
fprintf(stderr, "%s: select failed\n", prog);
@@ -165,6 +168,8 @@ bad:
}
}
#ifdef WIN32
#else
if (FD_ISSET(fileno(stdin), &fds)) {
memset(send_buf, 0, sizeof(send_buf));
@@ -181,6 +186,7 @@ bad:
goto end;
}
}
#endif
}