]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fixup unused warnings when running without threads.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 5 Sep 2007 14:56:38 +0000 (14:56 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 5 Sep 2007 14:56:38 +0000 (14:56 +0000)
git-svn-id: file:///svn/unbound/trunk@601 be551aaa-1e26-0410-a405-d3ace91eadb9

util/storage/lruhash.c

index f5c81c85317e921824401f4b69d951bd83979f47..d73eae31343c3034c21790ae77461429e07a4355 100644 (file)
@@ -47,6 +47,9 @@ void
 bin_init(struct lruhash_bin* array, size_t size)
 {
        size_t i;
+#if !defined(HAVE_PTHREAD) && !defined(HAVE_SOLARIS_THREADS)
+       (void)array;
+#endif
        for(i=0; i<size; i++) {
                lock_quick_init(&array[i].lock);
                lock_protect(&array[i].lock, &array[i], 
@@ -118,7 +121,9 @@ bin_split(struct lruhash* table, struct lruhash_bin* newa,
        /* move entries to new table. Notice that since hash x is mapped to
         * bin x & mask, and new mask uses one more bit, so all entries in
         * one bin will go into the old bin or bin | newbit */
+#if defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS)
        int newbit = newmask - table->size_mask;
+#endif
        /* so, really, this task could also be threaded, per bin. */
        /* LRU list is not changed */
        for(i=0; i<table->size; i++)