abuild.conf: define format-security and int-conversion errors
format-security warns of usage such as `printf(x)`, which is usually a security hole. int-conversion is very useful to find cases such as ``` error: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] msg = strerror_r(errnum, buf, buflen); ``` where the usage of things like the wrong strerror_r are legitimate errors in the application that cause it to crash. it makes more sense for the compiler to reject it instead, and this does that.
This commit is contained in:
parent
4258b204fe
commit
ca8375f0e9
|
@ -1,4 +1,4 @@
|
||||||
export CFLAGS="-Os -fomit-frame-pointer"
|
export CFLAGS="-Os -fomit-frame-pointer -Werror=format-security -Werror=int-conversion"
|
||||||
export CXXFLAGS="$CFLAGS"
|
export CXXFLAGS="$CFLAGS"
|
||||||
export CPPFLAGS="$CFLAGS"
|
export CPPFLAGS="$CFLAGS"
|
||||||
export LDFLAGS="-Wl,--as-needed,-O1,--sort-common"
|
export LDFLAGS="-Wl,--as-needed,-O1,--sort-common"
|
||||||
|
|
Loading…
Reference in New Issue