Added -Wall to compiler options and fixed all warnings