added -Wextra to compile line and fixed the warnings