From owner-svn-src-all@freebsd.org Thu Jul 14 15:39:33 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 146BDB97F15; Thu, 14 Jul 2016 15:39:33 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCADE16A9; Thu, 14 Jul 2016 15:39:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6EFdVYT065809; Thu, 14 Jul 2016 15:39:31 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6EFdVVp065802; Thu, 14 Jul 2016 15:39:31 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201607141539.u6EFdVVp065802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 14 Jul 2016 15:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302846 - in stable/10/cddl: contrib/opensolaris/common/ctf contrib/opensolaris/lib/libnvpair lib/libavl lib/libctf lib/libnvpair lib/libumem lib/libuutil X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2016 15:39:33 -0000 Author: asomers Date: Thu Jul 14 15:39:31 2016 New Revision: 302846 URL: https://svnweb.freebsd.org/changeset/base/302846 Log: MFC changes relating to warnings in opensolaris-derived libraries MFC r257592 MFC r257657 MFC r257638 MFC r257647 MFC r302141 r257592 | sbruno | 2013-11-03 14:05:44 -0700 (Sun, 03 Nov 2013) | 8 lines This library uses macros to define fprintf behvavior for several object types The compiler will see the non-string literal arguments to the fprintf calls and omit warnings for them. Quiese these warnings in contrib code: cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:743:12: warning: format string is not a string literal (potentially insecure) [-Wformat-security] ARENDER(pctl, nvlist_array, nvl, name, val, nelem); r257657 | sbruno | 2013-11-04 14:32:07 -0700 (Mon, 04 Nov 2013) | 5 lines Quiesce warning assigning to void * from const ctf_header_t * by explicity casting to void * before assignment. Submitted as Illumos issue 4287 r257638 | sbruno | 2013-11-04 09:15:43 -0700 (Mon, 04 Nov 2013) | 6 lines Quiesce warning regarding %llf which has no effect. Submitted as illumos issue #4284 Reviewed by: delphij r257647 | sbruno | 2013-11-04 12:32:35 -0700 (Mon, 04 Nov 2013) | 4 lines spelling in comments fixup Submitted by: Joerg Sonnenberger r302141 | asomers | 2016-06-23 09:02:57 -0600 (Thu, 23 Jun 2016) | 14 lines Raise the WARNS level in cddl/lib cddl/lib/libavl/Makefile cddl/lib/libctf/Makefile cddl/lib/libnvpair/Makefile cddl/lib/libumem/Makefile cddl/lib/libuutil/Makefile Increase WARNS to the highest working level for each of these libraries Sponsored by: Spectra Logic Corp Modified: stable/10/cddl/contrib/opensolaris/common/ctf/ctf_create.c stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c stable/10/cddl/lib/libavl/Makefile stable/10/cddl/lib/libctf/Makefile stable/10/cddl/lib/libnvpair/Makefile stable/10/cddl/lib/libumem/Makefile stable/10/cddl/lib/libuutil/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/common/ctf/ctf_create.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/common/ctf/ctf_create.c Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/contrib/opensolaris/common/ctf/ctf_create.c Thu Jul 14 15:39:31 2016 (r302846) @@ -65,7 +65,7 @@ ctf_create(int *errp) cts.cts_name = _CTF_SECTION; cts.cts_type = SHT_PROGBITS; cts.cts_flags = 0; - cts.cts_data = &hdr; + cts.cts_data = (void *)&hdr; cts.cts_size = sizeof (hdr); cts.cts_entsize = 1; cts.cts_offset = 0; Modified: stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Thu Jul 14 15:39:31 2016 (r302846) @@ -210,7 +210,7 @@ NVLIST_PRTFUNC(int32, int32_t, int32_t, NVLIST_PRTFUNC(uint32, uint32_t, uint32_t, "0x%x") NVLIST_PRTFUNC(int64, int64_t, longlong_t, "%lld") NVLIST_PRTFUNC(uint64, uint64_t, u_longlong_t, "0x%llx") -NVLIST_PRTFUNC(double, double, double, "0x%llf") +NVLIST_PRTFUNC(double, double, double, "0x%f") NVLIST_PRTFUNC(string, char *, char *, "%s") NVLIST_PRTFUNC(hrtime, hrtime_t, hrtime_t, "0x%llx") Modified: stable/10/cddl/lib/libavl/Makefile ============================================================================== --- stable/10/cddl/lib/libavl/Makefile Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/lib/libavl/Makefile Thu Jul 14 15:39:31 2016 (r302846) @@ -4,7 +4,7 @@ LIB= avl SRCS= avl.c -WARNS?= 0 +WARNS?= 3 CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common Modified: stable/10/cddl/lib/libctf/Makefile ============================================================================== --- stable/10/cddl/lib/libctf/Makefile Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/lib/libctf/Makefile Thu Jul 14 15:39:31 2016 (r302846) @@ -17,7 +17,7 @@ SRCS= ctf_create.c \ ctf_types.c \ ctf_util.c -WARNS?= 0 +WARNS?= 2 CFLAGS+= -DCTF_OLD_VERSIONS CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ Modified: stable/10/cddl/lib/libnvpair/Makefile ============================================================================== --- stable/10/cddl/lib/libnvpair/Makefile Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/lib/libnvpair/Makefile Thu Jul 14 15:39:31 2016 (r302846) @@ -12,7 +12,7 @@ SRCS= libnvpair.c \ opensolaris_nvpair.c \ opensolaris_nvpair_alloc_fixed.c -WARNS?= 0 +WARNS?= 1 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris @@ -22,4 +22,13 @@ CFLAGS+= -I${.CURDIR}/../../../sys CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem +# This library uses macros to define fprintf behavior for several object types +# The compiler will see the non-string literal arguments to the fprintf calls and +# omit warnings for them. Quiesce these warnings in contrib code: +# +# cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:743:12: warning: format +# string is not a string literal (potentially insecure) [-Wformat-security] +# ARENDER(pctl, nvlist_array, nvl, name, val, nelem); +# +CFLAGS+= -Wno-format-security .include Modified: stable/10/cddl/lib/libumem/Makefile ============================================================================== --- stable/10/cddl/lib/libumem/Makefile Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/lib/libumem/Makefile Thu Jul 14 15:39:31 2016 (r302846) @@ -4,7 +4,7 @@ LIB= umem SRCS= umem.c -WARNS?= 0 +WARNS?= 3 CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/lib/libumem .include Modified: stable/10/cddl/lib/libuutil/Makefile ============================================================================== --- stable/10/cddl/lib/libuutil/Makefile Thu Jul 14 15:09:08 2016 (r302845) +++ stable/10/cddl/lib/libuutil/Makefile Thu Jul 14 15:39:31 2016 (r302846) @@ -15,7 +15,7 @@ SRCS= avl.c \ uu_pname.c \ uu_strtoint.c -WARNS?= 0 +WARNS?= 1 CFLAGS+= -DNATIVE_BUILD CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris