Fixup unused warnings when running without threads.

git-svn-id: file:///svn/unbound/trunk@601 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-09-05 14:56:38 +00:00
parent 4736eaf80d
commit 5134e8e1ae

View 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++)