]> git.cworth.org Git - mnemon/commitdiff
Eliminate some compiler warnings.
authorCarl Worth <cworth@cworth.org>
Mon, 26 Sep 2011 00:58:38 +0000 (17:58 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 26 Sep 2011 00:58:38 +0000 (17:58 -0700)
Such as comparison between signed and unsigned integers and an unused
parameter.

mnemon.c

index 7f0526d8766beb410fd5a02caf6555817dba6f49..5fa8ac9e418a8d6f6f1e143c92d6d4addd039f6b 100644 (file)
--- 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;