Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2013 23:49:17 -0400
From:      Sean Bruno <sean_bruno@yahoo.com>
To:        hackers@freebsd.org
Subject:   warning spew from cddl libnvpair.c
Message-ID:  <1382672957.18382.11.camel@localhost>

next in thread | raw e-mail | index | archive | help

--=-bW3ehibkUSKStlLpZweE
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

libnvpair.c has some macros and preprocessor directives that make
clang's -Wformat-security very unhappy.

/home/sbruno/bsd/head/cddl/lib/libnvpair/../../../cddl/contrib/opensolaris/=
lib/libnvpair/libnvpair.c:245:1: warning: format string is not a string lit=
eral (po
tentially insecure) [-Wformat-security]
NVLIST_ARRPRTFUNC(byte_array, uchar_t, uchar_t, "0x%2.2x")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/sbruno/bsd/head/cddl/lib/libnvpair/../../../cddl/contrib/opensolaris/=
lib/libnvpair/libnvpair.c:238:23: note: expanded from macro 'NVLIST_ARRPRTF=
UNC'
                        (void) fprintf(fp, pctl->nvprt_btwnarrfmt); \


I don't see a real graceful way out of this.  Also, this is totally
"legit" C, so I don't see any reason to generate these warnings.  Can
someone educate me on either:
  1.  fixing these warnings the right way
  2.  how to disable the warning flags/makefile magic

sean

--=-bW3ehibkUSKStlLpZweE
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (FreeBSD)

iQEcBAABAgAGBQJSaeo9AAoJEBkJRdwI6BaHtaEH/jQVI99HWBBB5g9dELNwT72r
WXiLYrEpbwtWME3b0vOM92i/yh5hr8ei5xHzPpN+b3Y3DoKA0D3jNyYJi0uFvwvD
ZbEmTB/VJpYssfDQL/a9uh+HTRe1gNS1YMZ7rNu63X3P8oLHN+EeMzEbHKLKVH62
DHoHPcYEhVvTHSNJ0Sk33oseL1DDxC+tb6laq37Zd6KQedqTnFt1P34BmbxbDZmN
0se2k3lZImaJQb1Isv/+zJPi4EE7LqvXEnxi6yW2tV6Ibl109RkzWvtR3gTUDqc1
xXJ93HmWDkvimdXTBzDN2qSKZs8ylM5GT5k4RAhvSa9XXBHZyptTQiObsMIwqnU=
=EkFj
-----END PGP SIGNATURE-----

--=-bW3ehibkUSKStlLpZweE--




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