From nobody Tue Apr 30 06:32:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1491303640195895.6695114534584; Tue, 4 Apr 2017 04:00:40 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 96101C04B937; Tue, 4 Apr 2017 11:00:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3E38F825B4; Tue, 4 Apr 2017 11:00:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BFC6F18523CC; Tue, 4 Apr 2017 11:00:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v34B0XUl028902 for ; Tue, 4 Apr 2017 07:00:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id D6954825AF; Tue, 4 Apr 2017 11:00:33 +0000 (UTC) Received: from icr.brq.redhat.com (dhcp129-58.brq.redhat.com [10.34.129.58]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E81C825A7 for ; Tue, 4 Apr 2017 11:00:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 96101C04B937 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 96101C04B937 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 4 Apr 2017 12:57:58 +0200 Message-Id: <04be4111d90193016a390ecdd144bc80fa5667ef.1491303424.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] util: ignore -Wcast-align in virNetlinkDumpCommand X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 04 Apr 2017 11:00:38 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Similar to commit b202c39 ignore the warning that breaks the build with clang: util/virnetlink.c:365:52: error: cast from 'char *' to 'struct nlmsghdr *' increases required alignment from 1 to 4 [-Werror,-Wcast-align] for (msg =3D resp; NLMSG_OK(msg, len); msg =3D NLMSG_NEXT(msg, len)= ) { ^~~~~~~~~~~~~~~~~~~~ /usr/include/linux/netlink.h:87:7: note: expanded from macro 'NLMSG_NEXT' (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- src/util/virnetlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index 9bc1f0f..92ecf77 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -361,8 +361,9 @@ virNetlinkDumpCommand(struct nl_msg *nl_msg, =20 while (!end) { len =3D nl_recv(nlhandle, &nladdr, (unsigned char **)&resp, NULL); - + VIR_WARNINGS_NO_CAST_ALIGN for (msg =3D resp; NLMSG_OK(msg, len); msg =3D NLMSG_NEXT(msg, len= )) { + VIR_WARNINGS_RESET if (msg->nlmsg_type =3D=3D NLMSG_DONE) end =3D true; =20 --=20 2.10.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue Apr 30 06:32:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1491303640484336.62180167027554; Tue, 4 Apr 2017 04:00:40 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A1C4AC054C5F; Tue, 4 Apr 2017 11:00:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3D9EA5C6CA; Tue, 4 Apr 2017 11:00:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8475118523CD; Tue, 4 Apr 2017 11:00:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v34B0YeZ028910 for ; Tue, 4 Apr 2017 07:00:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id AB139825A7; Tue, 4 Apr 2017 11:00:34 +0000 (UTC) Received: from icr.brq.redhat.com (dhcp129-58.brq.redhat.com [10.34.129.58]) by smtp.corp.redhat.com (Postfix) with ESMTP id 313C9825AB for ; Tue, 4 Apr 2017 11:00:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A1C4AC054C5F Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A1C4AC054C5F From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 4 Apr 2017 12:57:59 +0200 Message-Id: <03a5d02acadde88988cc217ae97a76d01a1f7576.1491303424.git.jtomko@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] Split out -Wframe-larger-than warning from WARN_CLFAGS X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 04 Apr 2017 11:00:39 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Introduce STRICT_FRAME_LIMIT_CFLAGS that will be used for the library code and RELAXED_FRAME_LIMIT_CFLAGS for daemon code and the test code. Raising the limit for tests allows building them with clang with optimizations disabled. --- daemon/Makefile.am | 3 +++ m4/virt-compile-warnings.m4 | 4 ++-- src/Makefile.am | 1 + tests/Makefile.am | 2 ++ tools/Makefile.am | 6 ++++++ 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 60c7368..5deab1e 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -124,6 +124,7 @@ libvirtd_conf_la_CFLAGS =3D \ $(LIBXML_CFLAGS) \ $(XDR_CFLAGS) \ $(WARN_CFLAGS) $(PIE_CFLAGS) \ + $(RELAXED_FRAME_LIMIT_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) libvirtd_conf_la_LDFLAGS =3D \ @@ -143,6 +144,7 @@ libvirtd_admin_la_CFLAGS =3D \ $(XDR_CFLAGS) \ $(PIE_CFLAGS) \ $(WARN_CFLAGS) \ + $(RELAXED_FRAME_LIMIT_CFLAGS) \ $(LIBXML_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) @@ -177,6 +179,7 @@ libvirtd_CFLAGS =3D \ $(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \ $(XDR_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \ $(WARN_CFLAGS) $(PIE_CFLAGS) \ + $(RELAXED_FRAME_LIMIT_CFLAGS) \ $(COVERAGE_CFLAGS) \ -DQEMUD_PID_FILE=3D"\"$(QEMUD_PID_FILE)\"" =20 diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index 17fdf9d..768a5c8 100644 --- a/m4/virt-compile-warnings.m4 +++ b/m4/virt-compile-warnings.m4 @@ -169,8 +169,8 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ # This should be < 256 really. Currently we're down to 4096, # but using 1024 bytes sized buffers (mostly for virStrerror) # stops us from going down further - wantwarn=3D"$wantwarn -Wframe-larger-than=3D4096" - dnl wantwarn=3D"$wantwarn -Wframe-larger-than=3D256" + gl_WARN_ADD(["-Wframe-larger-than=3D4096"], [STRICT_FRAME_LIMIT_CFLAGS= ]) + gl_WARN_ADD(["-Wframe-larger-than=3D25600"], [RELAXED_FRAME_LIMIT_CFLA= GS]) =20 # Extra special flags dnl -fstack-protector stuff passes gl_WARN_ADD with gcc diff --git a/src/Makefile.am b/src/Makefile.am index 75e4344..f8e5017 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -39,6 +39,7 @@ INCLUDES =3D -I../gnulib/lib \ =20 AM_CFLAGS =3D $(LIBXML_CFLAGS) \ $(WARN_CFLAGS) \ + $(STRICT_FRAME_LIMIT_CFLAGS) \ $(LOCK_CHECKING_CFLAGS) \ $(WIN32_EXTRA_CFLAGS) \ $(COVERAGE_CFLAGS) diff --git a/tests/Makefile.am b/tests/Makefile.am index a6f189b..35f02d5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -46,6 +46,7 @@ AM_CFLAGS =3D \ $(APPARMOR_CFLAGS) \ $(YAJL_CFLAGS) \ $(COVERAGE_CFLAGS) \ + $(RELAXED_FRAME_LIMIT_CFLAGS) \ $(WARN_CFLAGS) =20 AM_LDFLAGS =3D \ @@ -925,6 +926,7 @@ commandhelper_SOURCES =3D \ commandhelper.c commandhelper_LDADD =3D \ $(WARN_CFLAGS) \ + $(RELAXED_FRAME_LIMIT_CFLAGS) \ $(NO_INDIRECT_LDFLAGS) \ $(PROBES_O) \ ../src/libvirt_util.la \ diff --git a/tools/Makefile.am b/tools/Makefile.am index 162d8e5..76e97eb 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -182,6 +182,7 @@ virt_host_validate_LDADD =3D \ virt_host_validate_CFLAGS =3D \ $(LIBXML_CFLAGS) \ $(WARN_CFLAGS) \ + $(RELAXED_FRAME_LIMIT_CFLAGS) \ $(PIE_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(NULL) @@ -208,6 +209,7 @@ virt_login_shell_CFLAGS =3D \ -DLIBVIRT_SETUID_RPC_CLIENT \ $(LIBXML_CFLAGS) \ $(WARN_CFLAGS) \ + $(RELAXED_FRAME_LIMIT_CFLAGS) \ $(PIE_CFLAGS) \ $(COVERAGE_CFLAGS) =20 @@ -239,6 +241,7 @@ virsh_LDADD =3D \ libvirt_shell.la virsh_CFLAGS =3D \ $(WARN_CFLAGS) \ + $(RELAXED_FRAME_LIMIT_CFLAGS) \ $(PIE_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(LIBXML_CFLAGS) @@ -260,6 +263,7 @@ virt_admin_LDADD =3D \ $(NULL) virt_admin_CFLAGS =3D \ $(WARN_CFLAGS) \ + $(RELAXED_FRAME_LIMIT_CFLAGS) \ $(PIE_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(LIBXML_CFLAGS) \ @@ -499,6 +503,7 @@ nss_libnss_libvirt_impl_la_CFLAGS =3D \ -DLIBVIRT_NSS \ $(AM_CFLAGS) \ $(WARN_CFLAGS) \ + $(STRICT_FRAME_LIMIT_CFLAGS) \ $(PIE_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(LIBXML_CFLAGS) @@ -529,6 +534,7 @@ nss_libnss_libvirt_guest_impl_la_CFLAGS =3D \ -DLIBVIRT_NSS_GUEST \ $(AM_CFLAGS) \ $(WARN_CFLAGS) \ + $(STRICT_FRAME_LIMIT_CFLAGS) \ $(PIE_CFLAGS) \ $(COVERAGE_CFLAGS) \ $(LIBXML_CFLAGS) --=20 2.10.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list