]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When building with clang, disable -Wformat-security for
authorDimitry Andric <dim@FreeBSD.org>
Tue, 21 Feb 2012 21:20:52 +0000 (21:20 +0000)
committerDimitry Andric <dim@FreeBSD.org>
Tue, 21 Feb 2012 21:20:52 +0000 (21:20 +0000)
commita0dd79dbdf917a8fbe2762d668f05a7c9f682b22
tree14a8497d3cccec0212d59b00996422a1413c645c
parent8508b798359bec3d7b3dc612d06cc432de865588
When building with clang, disable -Wformat-security for
sys/dev/hpt27xx/osm_bsd.c, since it gets the following warnings:

sys/dev/hpt27xx/osm_bsd.c:1180:25: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
            S_IRUSR | S_IWUSR, driver_name);
                               ^~~~~~~~~~~
@/dev/hpt27xx/hpt27xx_config.h:46:21: note: expanded from:
#define driver_name hpt27xx_driver_name
                    ^~~~~~~~~~~~~~~~~~~

Since 'hpt27xx_driver_name' is a constant string symbol (coming from the
proprietary hpt27xx_lib.o file), there is no security problem.

Because this driver is provided by the vendor, and applying changes
requires re-certification and other bureaucratic exercises, just disable
the warning for now.

MFC after: 1 week
sys/conf/kern.mk
sys/modules/hpt27xx/Makefile