From: Martin Mares Date: Sat, 3 Feb 2007 23:01:15 +0000 (+0100) Subject: Squash a couple of warnings. X-Git-Tag: holmes-import~506^2~13^2~169 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=bbcbba14a32658a09d7cd44cee40c8369065822f;p=libucw.git 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. --- 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