Fixed compile warnings

Fixed warnings with gcc4.8.
fixed.
cast to void to avoid warnings.