Fix some compiler warnings

* Unused variables in release build
* Comparison of bool to int

Change-Id: I1ac9b1051b26ae0655d4ff6b92d216926a4785da
Reviewed-by: hjk <hjk121@nokiamail.com>