Fixed warnings when compiling with -pedantic