Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Feb 2012 08:46:53 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Jia-Shiun Li <jiashiun@gmail.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Failed to compile current kernel with llvm/clang
Message-ID:  <4F41FA6D.4020805@FreeBSD.org>
In-Reply-To: <CAHNYxxMo5rhjvpqvfVi5g83uP253qyMBv9P-vJH5Zr-aBar0Qg@mail.gmail.com>
References:  <CAHNYxxMo5rhjvpqvfVi5g83uP253qyMBv9P-vJH5Zr-aBar0Qg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2012-02-20 02:54, Jia-Shiun Li wrote:
> I am trying to build world and kernel with llvm according to
> instructions on wiki:
> 
> http://wiki.freebsd.org/BuildingFreeBSDWithClang
> 
> buildworld is fine, but when building GENERIC kernel it failed on hpt27xx:
> 
> ===> hpt27xx (all)
> /usr/src/sys/modules/hpt27xx/../../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
>                     ^~~~~~~~~~~~~~~~~~~
> 
> I cannot find symbol hpt27xx_driver_name in that directory. Is it
> expanded from some macros I am not aware of?

This is one of the very few warnings left in the kernel.  Userland
already compiles without any fatal warning.

Because the hpt driver is submitted by the vendor, the warning you are
encountering can't easily be fixed.  It will hopefully be fixed on the
next code drop from the vendor.

In the meantime, I will put a band-aid in the Makefile.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F41FA6D.4020805>