WARNINGS := -Wall -W -Wunused-parameter -Wmissing-declarations
WARNINGS += -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare
WARNINGS += -Wconversion -Wshadow -Wcast-align -Wparentheses
WARNINGS += -Wsequence-point -Wdeclaration-after-statement -Wundef
WARNINGS += -Wpointer-arith -Wnested-externs -Wredundant-decls
WARNINGS += -Werror -Wdisabled-optimization -pedantic
CFLAGS += $(WARNINGS)
Note: -pedantic is pretty good if you really wanna learn how to write code that will work properly.
Also: Treating Warnings as Errors is a good thing. You'll learn a lot, and the most important thing will be: handle all warnings. Do not release code until it builds clean.