Warnings fixed for cppcheck for c type cast.

Signed-off-by: Ion Parau <iparau@mikogo.com>