Fixed warnings when using -Wall -pedantic -Wextra on GCC and Clang