Ignore:
Timestamp:
Nov 16, 2003, 12:26:54 PM (17 years ago)
Author:
Sam Hocevar
Message:
  • configure.ac: + Added -Wsign-compare to the warning flags.
  • libcaca/caca.c: + Fixed a signed/unsigned bug that caused infinite waits with

ee_set_delay(0).

  • src/weapons.c libcaca/graphics.c libcaca/blit.c libcaca/conic.c: + Fixed minor signed/unsigned comparison warnings.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ttyvaders/trunk/libcaca/caca.c

    r186 r188  
    258258{
    259259#define IDLE_USEC 10000
    260     static unsigned int lastticks = 0;
    261     unsigned int ticks = lastticks + _caca_getticks();
     260    static int lastticks = 0;
     261    int ticks = lastticks + _caca_getticks();
    262262
    263263#if defined(USE_SLANG)
     
    275275    /* Wait until _caca_delay + time of last call */
    276276    ticks += _caca_getticks();
    277     for(; ticks < _caca_delay - IDLE_USEC; ticks += _caca_getticks())
     277    for(; ticks + IDLE_USEC < (int)_caca_delay; ticks += _caca_getticks())
    278278        usleep(IDLE_USEC);
    279279
     
    284284
    285285    /* If we drifted too much, it's bad, bad, bad. */
    286     if(lastticks > _caca_delay)
     286    if(lastticks > (int)_caca_delay)
    287287        lastticks = 0;
    288288}
Note: See TracChangeset for help on using the changeset viewer.