Fixed the code to compile without warnings with -Wextra