Fix warnings when compiling with stricter warning flags