From nobody Fri May 3 01:55:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1500563896458351.33167694439703; Thu, 20 Jul 2017 08:18:16 -0700 (PDT) Received: from localhost ([::1]:38549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYDDQ-0000N4-5k for importer@patchew.org; Thu, 20 Jul 2017 11:18:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYD15-00051u-7x for qemu-devel@nongnu.org; Thu, 20 Jul 2017 11:05:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYD10-000063-5C for qemu-devel@nongnu.org; Thu, 20 Jul 2017 11:05:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54338) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dYD0z-0008Tf-V3 for qemu-devel@nongnu.org; Thu, 20 Jul 2017 11:05:22 -0400 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 E1E7B25C26 for ; Thu, 20 Jul 2017 14:57:30 +0000 (UTC) Received: from vader.redhat.com (ovpn-116-109.ams2.redhat.com [10.36.116.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48D4880A46 for ; Thu, 20 Jul 2017 14:57:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E1E7B25C26 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=otubo@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E1E7B25C26 From: Eduardo Otubo To: qemu-devel@nongnu.org Date: Thu, 20 Jul 2017 16:57:29 +0200 Message-Id: <20170720145729.22141-1-otubo@redhat.com> MIME-Version: 1.0 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.30]); Thu, 20 Jul 2017 14:57:31 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] configure: add -Wno-format-truncation to QEMU_CFLAGS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Compilation breaks on GCC 7.1.1 20170622 (Fedora 26), thus adding -Wno-format-truncation to QEMU_CFLAGS on configure script is neecssary. hw/usb/bus.c: In function =E2=80=98usb_port_location=E2=80=99: hw/usb/bus.c:410:66: error: =E2=80=98%d=E2=80=99 directive output may b= e truncated writing between 1 and 11 bytes into a region of size between 0 = and 15 [-Werror=3Dformat-truncation=3D] snprintf(downstream->path, sizeof(downstream->path), "%s.%d", ^~ In file included from /usr/include/stdio.h:939:0, from /home/otubo/develop/qemu/otubo/include/qemu/osdep= .h:68, from hw/usb/bus.c:1: /usr/include/bits/stdio2.h:64:10: note: =E2=80=98__builtin___snprintf_c= hk=E2=80=99 output between 3 and 28 bytes into a destination of size 16 return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make: *** [/home/otubo/develop/qemu/otubo/rules.mak:66: hw/usb/bus.o] E= rror 1 make: *** Waiting for unfinished jobs.... Signed-off-by: Eduardo Otubo --- This warning looks pretty much bogus to me. Since building with -Werror is essential, we should add this flag to configure. If someone thinks this war= ning is not a false positive, feel free to drop this patch. configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index befebe27e3..5d5507b3a0 100755 --- a/configure +++ b/configure @@ -482,6 +482,7 @@ ARFLAGS=3D"${ARFLAGS-rv}" # left shift of signed integers is well defined and has the expected # 2s-complement style results. (Both clang and gcc agree that it # provides these semantics.) +QEMU_CFLAGS=3D"-Wno-format-truncation $QEMU_CFLALGS" QEMU_CFLAGS=3D"-fno-strict-aliasing -fno-common -fwrapv $QEMU_CFLAGS" QEMU_CFLAGS=3D"-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CF= LAGS" QEMU_CFLAGS=3D"-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" --=20 2.13.3