From bbcbba14a32658a09d7cd44cee40c8369065822f Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 4 Feb 2007 00:01:15 +0100 Subject: [PATCH] Squash a couple of warnings. The one about comparison being always the same because of data type ranges is especially annoying, but I don't know how to shut it up. --- lib/sorter/s-internal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/sorter/s-internal.h b/lib/sorter/s-internal.h index 7fd84bc8..309c503b 100644 --- a/lib/sorter/s-internal.h +++ b/lib/sorter/s-internal.h @@ -56,7 +56,9 @@ static int P(internal)(struct sort_context *ctx, struct sort_bucket *bin, struct #endif size_t bufsize = ctx->big_buf_half_size; /* FIXME: In some cases, we can use the whole buffer */ +#ifdef CPU_64BIT_POINTERS bufsize = MIN((u64)bufsize, (u64)~0U * sizeof(P(internal_item_t))); // The number of records must fit in uns +#endif SORT_XTRACE("s-internal: Reading (bufsize=%zd)", bufsize); P(internal_item_t) *item_array = ctx->big_buf, *item = item_array, *last_item; @@ -97,7 +99,7 @@ static int P(internal)(struct sort_context *ctx, struct sort_bucket *bin, struct bout = bout_only; struct fastbuf *out = sbuck_write(bout); bout->runs++; - uns merged = 0; + uns merged UNUSED = 0; for (item = item_array; item < last_item; item++) { #ifdef SORT_UNIFY -- 2.39.2