Mercurial > mplayer.hg
changeset 24135:84bc662dc979
Fix loads of warnings
author | reimar |
---|---|
date | Sat, 25 Aug 2007 06:52:17 +0000 |
parents | e18a800a02e7 |
children | a659694f00bc |
files | input/input.c |
diffstat | 1 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/input/input.c Sat Aug 25 04:28:20 2007 +0000 +++ b/input/input.c Sat Aug 25 06:52:17 2007 +0000 @@ -1108,6 +1108,10 @@ { int i; 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++) if (key_fds[i].dead) { mp_input_rm_key_fd(key_fds[i].fd); @@ -1121,10 +1125,9 @@ else if (cmd_fds[i].got_cmd) got_cmd = 1; #ifdef HAVE_POSIX_SELECT - int max_fd = 0, num_fd = 0; - fd_set fds; FD_ZERO(&fds); if (!got_cmd) { + int max_fd = 0, num_fd = 0; for (i = 0; i < num_key_fd; i++) { if (key_fds[i].no_select) continue; @@ -1165,12 +1168,12 @@ for (i = 0; i < num_key_fd; i++) { + int code; #ifdef HAVE_POSIX_SELECT if (!key_fds[i].no_select && !FD_ISSET(key_fds[i].fd, &fds)) continue; #endif - int code; if (key_fds[i].no_readfunc_retval) { // getch2 handler special-cased for now ((void (*)(void))key_fds[i].read_func)(); if (cmd_queue_length) @@ -1195,17 +1198,18 @@ key_fds[i].dead = 1; } } - mp_cmd_t *autorepeat_cmd = check_autorepeat(paused); + autorepeat_cmd = check_autorepeat(paused); if (autorepeat_cmd) return autorepeat_cmd; for (i = 0; i < num_cmd_fd; i++) { + char *cmd; + int r; #ifdef HAVE_POSIX_SELECT if (!cmd_fds[i].no_select && !FD_ISSET(cmd_fds[i].fd, &fds)) continue; #endif - char *cmd; - int r = mp_input_read_cmd(&cmd_fds[i], &cmd); + r = mp_input_read_cmd(&cmd_fds[i], &cmd); if (r >= 0) { mp_cmd_t *ret = mp_input_parse_cmd(cmd); free(cmd);