From f525171a603949f03a26727416556ebc69fed0b3 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sun, 25 Sep 2011 17:58:38 -0700 Subject: [PATCH] Eliminate some compiler warnings. Such as comparison between signed and unsigned integers and an unused parameter. --- mnemon.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mnemon.c b/mnemon.c index 7f0526d..5fa8ac9 100644 --- a/mnemon.c +++ b/mnemon.c @@ -42,6 +42,8 @@ do { \ assert (NOT_REACHED); \ } while (0) +#define unused(foo) foo __attribute__((unused)) + typedef int bool_t; typedef struct _item { @@ -916,7 +918,7 @@ mnemon_item_in_category_of_length (void *closure, item_t *item) item_in_category_of_length_closure_t *iicolc = closure; mnemon_t *mnemon = iicolc->mnemon; category_t *category = iicolc->category; - int length = iicolc->length; + unsigned int length = iicolc->length; if (mnemon_item_category (mnemon, item) != category) return 0; @@ -1236,7 +1238,8 @@ mnemon_show_challenge (mnemon_t *mnemon, } static void -mnemon_hide_challenge (mnemon_t *mnemon, challenge_type_t challenge_type) +mnemon_hide_challenge (unused (mnemon_t *mnemon), + challenge_type_t challenge_type) { char * command; -- 2.43.0