Fix unused variable warnings

Change-Id: I57b572f855f8aa4e2df9853cfb56a68843f8e301
Reviewed-on: http://review.couchbase.org/41764
Reviewed-by: Sarath Lakshman <sarath@couchbase.com>
Tested-by: Volker Mische <volker.mische@gmail.com>