qsort: fix warnings
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
c864db3eec
commit
ebed2b919f
6
third_party/libbase/qsort.c
vendored
6
third_party/libbase/qsort.c
vendored
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#define min(a, b) (a) < (b) ? a : b
|
#define min(a, b) ((unsigned)(a)) < (((unsigned)(b))) ? ((unsigned)(a)) : ((unsigned)(b))
|
||||||
|
|
||||||
#define swapcode(TYPE, parmi, parmj, n) \
|
#define swapcode(TYPE, parmi, parmj, n) \
|
||||||
{ \
|
{ \
|
||||||
@ -199,12 +199,12 @@ loop:
|
|||||||
r = min(pd - pc, pn - pd - size);
|
r = min(pd - pc, pn - pd - size);
|
||||||
vecswap(pb, pn - r, r);
|
vecswap(pb, pn - r, r);
|
||||||
|
|
||||||
if ((r = pb - pa) > size)
|
if ((r = pb - pa) > (int)size)
|
||||||
{
|
{
|
||||||
qsort(base, r / size, size, compar);
|
qsort(base, r / size, size, compar);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((r = pd - pc) > size)
|
if ((r = pd - pc) > (int)size)
|
||||||
{
|
{
|
||||||
/* Iterate rather than recurse to save stack space */
|
/* Iterate rather than recurse to save stack space */
|
||||||
base = pn - r;
|
base = pn - r;
|
||||||
|
Loading…
Reference in New Issue
Block a user