src/stdlib/SDL_qsort.c
changeset 1456 84de7511f79f
parent 1402 d910939febfa
child 1662 782fd950bd46
child 1895 c121d94672cb
child 4186 5bacec0933f5
     1.1 --- a/src/stdlib/SDL_qsort.c	Mon Feb 27 22:14:40 2006 +0000
     1.2 +++ b/src/stdlib/SDL_qsort.c	Wed Mar 01 09:43:47 2006 +0000
     1.3 @@ -263,7 +263,7 @@
     1.4  
     1.5  static char * pivot_big(char *first, char *mid, char *last, size_t size,
     1.6                          int compare(const void *, const void *)) {
     1.7 -  int d=(((last-first)/size)>>3)*size;
     1.8 +  size_t d=(((last-first)/size)>>3)*size;
     1.9    char *m1,*m2,*m3;
    1.10    { char *a=first, *b=first+d, *c=first+2*d;
    1.11  #ifdef DEBUG_QSORT
    1.12 @@ -414,7 +414,7 @@
    1.13             int (*compare)(const void *, const void *)) {
    1.14  
    1.15    if (nmemb<=1) return;
    1.16 -  if (((int)base|size)&(WORD_BYTES-1))
    1.17 +  if (((uintptr_t)base|size)&(WORD_BYTES-1))
    1.18      qsort_nonaligned(base,nmemb,size,compare);
    1.19    else if (size!=WORD_BYTES)
    1.20      qsort_aligned(base,nmemb,size,compare);