fixed warnings building with -Wall and -Werror