Code compiles without warnings with -Wall -Wextra -pedantic