freebsd-dev/sys/modules/hpt27xx/Makefile
Dimitry Andric a0dd79dbdf 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
2012-02-21 21:20:52 +00:00

18 lines
423 B
Makefile

# $FreeBSD$
HPT27XX= ${.CURDIR}/../../dev/hpt27xx
.PATH: ${HPT27XX}
KMOD= hpt27xx
SRCS= bus_if.h device_if.h pci_if.h
SRCS+= opt_cam.h opt_scsi.h
SRCS+= os_bsd.h os_bsd.c osm_bsd.c hpt27xx_config.c
OBJS+= hpt27xx_lib.o
hpt27xx_lib.o:
uudecode -p < ${HPT27XX}/$(MACHINE_ARCH)-elf.hpt27xx_lib.o.uu > ${.TARGET}
.include <bsd.kmod.mk>
CWARNFLAGS.osm_bsd.c= ${NO_WFORMAT_SECURITY}
CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}