* xgselect.c (xg_select): Remove unused var.
This commit is contained in:
parent
ec6cf4c6ff
commit
41729b81ac
2 changed files with 10 additions and 9 deletions
|
@ -1,5 +1,7 @@
|
|||
2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* xgselect.c (xg_select): Remove unused var.
|
||||
|
||||
* image.c (four_corners_best): Mark locals as initialized.
|
||||
(gif_load): Initialize transparent_p to zero (Bug#8238).
|
||||
Mark another local as initialized.
|
||||
|
|
|
@ -38,7 +38,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
|
|||
GMainContext *context = g_main_context_default ();
|
||||
int have_wfds = wfds != NULL;
|
||||
int n_gfds = 0, our_tmo = 0, retval = 0, our_fds = 0;
|
||||
int prio, i, nfds, tmo_in_millisec;
|
||||
int i, nfds, tmo_in_millisec;
|
||||
|
||||
if (rfds) memcpy (&all_rfds, rfds, sizeof (all_rfds));
|
||||
else FD_ZERO (&all_rfds);
|
||||
|
@ -49,9 +49,9 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
|
|||
g_main_context_pending (context);
|
||||
|
||||
do {
|
||||
if (n_gfds > gfds_size)
|
||||
if (n_gfds > gfds_size)
|
||||
{
|
||||
while (n_gfds > gfds_size)
|
||||
while (n_gfds > gfds_size)
|
||||
gfds_size *= 2;
|
||||
xfree (gfds);
|
||||
gfds = xmalloc (sizeof (*gfds) * gfds_size);
|
||||
|
@ -64,7 +64,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
|
|||
gfds_size);
|
||||
} while (n_gfds > gfds_size);
|
||||
|
||||
for (i = 0; i < n_gfds; ++i)
|
||||
for (i = 0; i < n_gfds; ++i)
|
||||
{
|
||||
if (gfds[i].events & G_IO_IN)
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
|
|||
else
|
||||
{
|
||||
EMACS_TIME difference;
|
||||
|
||||
|
||||
EMACS_SUB_TIME (difference, tmo, *timeout);
|
||||
if (EMACS_TIME_NEG_P (difference)) our_tmo = 1;
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
|
|||
|
||||
if (nfds < 0)
|
||||
retval = nfds;
|
||||
else if (nfds > 0)
|
||||
else if (nfds > 0)
|
||||
{
|
||||
for (i = 0; i < max_fds+1; ++i)
|
||||
{
|
||||
|
@ -127,7 +127,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
|
|||
|
||||
if (our_fds > 0 || (nfds == 0 && our_tmo))
|
||||
{
|
||||
|
||||
|
||||
/* If Gtk+ is in use eventually gtk_main_iteration will be called,
|
||||
unless retval is zero. */
|
||||
#ifdef USE_GTK
|
||||
|
@ -137,7 +137,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
|
|||
g_main_context_dispatch (context);
|
||||
|
||||
/* To not have to recalculate timeout, return like this. */
|
||||
if (retval == 0)
|
||||
if (retval == 0)
|
||||
{
|
||||
retval = -1;
|
||||
errno = EINTR;
|
||||
|
@ -156,4 +156,3 @@ xgselect_initialize (void)
|
|||
gfds = xmalloc (sizeof (*gfds)*gfds_size);
|
||||
#endif /* defined (USE_GTK) || defined (HAVE_GCONF) */
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue