Fix compiler warnings

Change-Id: I5d5eca4af0faa392defcec8ac50c7026eaeba2b1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>