Do to a mistake the compiler warning flags did not get propagated properly. This is now mostly fixed. -ansi (?) and -Wextra (?) still missing
Fixes the issues pointed out by -Wall -pedantic
Also switches on -Werror to break on error