From: Roberto B. <rb...@gm...> - 2011-04-14 11:00:13
|
This patch fixs gcc warning of unused variables when compiling without POINTER_BLANK, CURSOR_BLINK, TRANSPARENT and USE_XIM defined. On mrxvt05b Revision 403 - Tue Feb 9 04:12:27 2010 UTC Index: src/command.c =================================================================== --- src/command.c (revision 404) +++ src/command.c (working copy) @@ -2107,11 +2107,16 @@ rxvt_adjust_quick_timeout (rxvt_t* r, int quick_timeout, struct timeval* value) { struct rxvt_hidden* h = r->h; + +#if defined(POINTER_BLANK) || defined(CURSOR_BLINK) || defined(TRANSPARENT) struct timeval tp; int set_quick_timeout = 0; - int32_t fsdiff = 60000000l; /* or say LONG_MAX */ + int32_t fsdiff = 60000000L; /* or say LONG_MAX */ + int32_t csdiff = 60000000L; /* or say LONG_MAX */ + int32_t psdiff = 60000000L; /* or say LONG_MAX */ + int32_t bsdiff = 60000000L; /* or say LONG_MAX */ +#endif - assert (NOT_NULL(value)); value->tv_usec = TIMEOUT_USEC; value->tv_sec = 0; @@ -2128,11 +2133,6 @@ } #if defined(POINTER_BLANK) || defined(CURSOR_BLINK) || defined(TRANSPARENT) - { - int32_t csdiff, psdiff, bsdiff; - - csdiff = psdiff = bsdiff = 60000000L; /* or, say, LONG_MAX */ - # ifdef TRANSPARENT /* Check if we should refresh our background */ if( h->lastCNotify.tv_sec ) @@ -2228,7 +2228,6 @@ value->tv_usec = csdiff % 1000000L; quick_timeout = 1; } - } #endif /* POINTER_BLANK || CURSOR_BLINK || TRANSPARENT */ quick_timeout |= r->gotEIO; @@ -2314,7 +2313,11 @@ struct timeval tp; #endif struct timeval value; + +#if defined(POINTER_BLANK) || defined(CURSOR_BLINK) || defined(USE_XIM) struct rxvt_hidden *h = r->h; +#endif + register int i; |