Fix compiler warnings

Change-Id: I6ad0a6a3abf0f0f1d094671899a7bd7ba98f87cb
Reviewed-on: http://review.couchbase.org/42828
Tested-by: Trond Norbye <trond.norbye@gmail.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>