Remove gcc warnings included in -Wall

-Wlogical-not-parentheses -Wsizeof-array-argument -Wbool-compare
Document -Wcast-qual is noisy