Packages can be compiled with some warnings enabled:
This option performs sanity checks on format strings.
This option performs additional sanity checks to printf() and scanf() functions.
This option will warn about functions not protected against stack smashing.
This option will cause warnings to be treated as errors.
This option will cause the compiler to abort on the first error.
The GCC man page contains more details about much more options.