mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 23:00:41 +00:00
Fix loads of warnings
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24155 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
ad5c7d5bb1
commit
8adf56e9a3
@ -1108,6 +1108,10 @@ static mp_cmd_t *read_events(int time, int paused)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int got_cmd = 0;
|
int got_cmd = 0;
|
||||||
|
mp_cmd_t *autorepeat_cmd;
|
||||||
|
#ifdef HAVE_POSIX_SELECT
|
||||||
|
fd_set fds;
|
||||||
|
#endif
|
||||||
for (i = 0; i < num_key_fd; i++)
|
for (i = 0; i < num_key_fd; i++)
|
||||||
if (key_fds[i].dead) {
|
if (key_fds[i].dead) {
|
||||||
mp_input_rm_key_fd(key_fds[i].fd);
|
mp_input_rm_key_fd(key_fds[i].fd);
|
||||||
@ -1121,10 +1125,9 @@ static mp_cmd_t *read_events(int time, int paused)
|
|||||||
else if (cmd_fds[i].got_cmd)
|
else if (cmd_fds[i].got_cmd)
|
||||||
got_cmd = 1;
|
got_cmd = 1;
|
||||||
#ifdef HAVE_POSIX_SELECT
|
#ifdef HAVE_POSIX_SELECT
|
||||||
int max_fd = 0, num_fd = 0;
|
|
||||||
fd_set fds;
|
|
||||||
FD_ZERO(&fds);
|
FD_ZERO(&fds);
|
||||||
if (!got_cmd) {
|
if (!got_cmd) {
|
||||||
|
int max_fd = 0, num_fd = 0;
|
||||||
for (i = 0; i < num_key_fd; i++) {
|
for (i = 0; i < num_key_fd; i++) {
|
||||||
if (key_fds[i].no_select)
|
if (key_fds[i].no_select)
|
||||||
continue;
|
continue;
|
||||||
@ -1165,12 +1168,12 @@ static mp_cmd_t *read_events(int time, int paused)
|
|||||||
|
|
||||||
|
|
||||||
for (i = 0; i < num_key_fd; i++) {
|
for (i = 0; i < num_key_fd; i++) {
|
||||||
|
int code;
|
||||||
#ifdef HAVE_POSIX_SELECT
|
#ifdef HAVE_POSIX_SELECT
|
||||||
if (!key_fds[i].no_select && !FD_ISSET(key_fds[i].fd, &fds))
|
if (!key_fds[i].no_select && !FD_ISSET(key_fds[i].fd, &fds))
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int code;
|
|
||||||
if (key_fds[i].no_readfunc_retval) { // getch2 handler special-cased for now
|
if (key_fds[i].no_readfunc_retval) { // getch2 handler special-cased for now
|
||||||
((void (*)(void))key_fds[i].read_func)();
|
((void (*)(void))key_fds[i].read_func)();
|
||||||
if (cmd_queue_length)
|
if (cmd_queue_length)
|
||||||
@ -1195,17 +1198,18 @@ static mp_cmd_t *read_events(int time, int paused)
|
|||||||
key_fds[i].dead = 1;
|
key_fds[i].dead = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mp_cmd_t *autorepeat_cmd = check_autorepeat(paused);
|
autorepeat_cmd = check_autorepeat(paused);
|
||||||
if (autorepeat_cmd)
|
if (autorepeat_cmd)
|
||||||
return autorepeat_cmd;
|
return autorepeat_cmd;
|
||||||
|
|
||||||
for (i = 0; i < num_cmd_fd; i++) {
|
for (i = 0; i < num_cmd_fd; i++) {
|
||||||
|
char *cmd;
|
||||||
|
int r;
|
||||||
#ifdef HAVE_POSIX_SELECT
|
#ifdef HAVE_POSIX_SELECT
|
||||||
if (!cmd_fds[i].no_select && !FD_ISSET(cmd_fds[i].fd, &fds))
|
if (!cmd_fds[i].no_select && !FD_ISSET(cmd_fds[i].fd, &fds))
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
char *cmd;
|
r = mp_input_read_cmd(&cmd_fds[i], &cmd);
|
||||||
int r = mp_input_read_cmd(&cmd_fds[i], &cmd);
|
|
||||||
if (r >= 0) {
|
if (r >= 0) {
|
||||||
mp_cmd_t *ret = mp_input_parse_cmd(cmd);
|
mp_cmd_t *ret = mp_input_parse_cmd(cmd);
|
||||||
free(cmd);
|
free(cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user