Fix various compiler warnings

Signed-off-by: Alberto Corona <albcoron@gmail.com>