From patchwork Fri Jul 26 00:50:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 11060083 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 848C81398 for ; Fri, 26 Jul 2019 00:52:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 727B828A15 for ; Fri, 26 Jul 2019 00:52:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66CB128A6C; Fri, 26 Jul 2019 00:52:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F05DA28A15 for ; Fri, 26 Jul 2019 00:52:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqoS0-0006bG-Dy; Fri, 26 Jul 2019 00:51:12 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hqoRy-0006bA-T7 for xen-devel@lists.xenproject.org; Fri, 26 Jul 2019 00:51:10 +0000 X-Inumbo-ID: 712258b2-af3f-11e9-bb93-b76052d09557 Received: from m4a0041g.houston.softwaregrp.com (unknown [15.124.2.87]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 712258b2-af3f-11e9-bb93-b76052d09557; Fri, 26 Jul 2019 00:51:05 +0000 (UTC) Received: FROM m4a0041g.houston.softwaregrp.com (15.120.17.146) BY m4a0041g.houston.softwaregrp.com WITH ESMTP; Fri, 26 Jul 2019 00:50:51 +0000 Received: from M4W0335.microfocus.com (2002:f78:1193::f78:1193) by M4W0334.microfocus.com (2002:f78:1192::f78:1192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 26 Jul 2019 00:50:19 +0000 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (15.124.8.12) by M4W0335.microfocus.com (15.120.17.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Fri, 26 Jul 2019 00:50:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lWG/UAQk+LUL11mkeuuTwGj53V1ClwfyC2lijYFNJ/WCvUaChXzQW/X3QxFLok+BYJBI98npe8Ju1vsPus/MFjlj/4oLA2QAowi+gyE4ryDLoGkh0Xxns8dmK6iLcIyoU7r4UZzaA0tBVStgxPKnbUMXpRxN/yFZrxGTv8ab/fqR700SOBocayYcrq9K83+KiHracskYRlOHR+J/fWIbdFqeFsB2dxhygXsdXd/jIvunZcK85dyZQmNJXQHTsArIkybU0N2KtZLSdyLH/Op37XPDyO5838zpZiqEfVj58oDt9yDYMFRacUui0FU0kFsNC++t/T7GaxKhQisgxyVNSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3hLjTF9L+hMdfsMoHAm9NVRCflLTHKRGwPgAtkuiwwk=; b=QjVtB5vrl5jpvS0FdZiDZ4nSVjKZSuIJ7kQBBFKRJXzmj5O9W3PzOsFX6UMPQ/t+bMSTGK3HpLuo/gqA3zwZ/NChyWfxDAfrMsVdqXgU2JUbbMcnOoOOGA1eJUaLui7niiZoGmmmUCRWHisxm8Kxc/9O/5PXYlYmNN6G7x9srs6wJ5UTHQqdFNDZGJMlU3IP5ACk6ruNEgYRYLV+WIA7+ds7xDBzwWMsOa5SaO+iiM0N0m9Sh9GCV9Cp+Wv8ZXxFMSxnspU5pvOumOyZXTMkPwzRUc8zDQ3oQf1nZ5U5zaov9eGJuLuosT9aRtI0KSaXHGBvr5qA2VooXqefJxMBiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none Received: from DM5PR18MB1499.namprd18.prod.outlook.com (10.175.220.20) by DM5PR18MB0985.namprd18.prod.outlook.com (10.168.119.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.17; Fri, 26 Jul 2019 00:50:18 +0000 Received: from DM5PR18MB1499.namprd18.prod.outlook.com ([fe80::e9ac:eb60:5b04:1a0a]) by DM5PR18MB1499.namprd18.prod.outlook.com ([fe80::e9ac:eb60:5b04:1a0a%9]) with mapi id 15.20.2094.013; Fri, 26 Jul 2019 00:50:18 +0000 From: Dario Faggioli To: "xen-devel@lists.xenproject.org" Thread-Topic: Failing to build test-cpu-policy.c with GCC9 Thread-Index: AQHVQ0wYS55fVj31VUuPy4mON27BUA== Date: Fri, 26 Jul 2019 00:50:17 +0000 Message-ID: <20ec48febe15d329547b0dc4fe1e411e0043c4df.camel@suse.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dfaggioli@suse.com; x-originating-ip: [89.186.78.87] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 591c8e79-acae-496d-502a-08d711633ac4 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(49563074)(7193020); SRVR:DM5PR18MB0985; x-ms-traffictypediagnostic: DM5PR18MB0985: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:612; x-forefront-prvs: 01106E96F6 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(396003)(366004)(136003)(346002)(39860400002)(376002)(199004)(189003)(64756008)(2906002)(4326008)(25786009)(6486002)(6436002)(2501003)(478600001)(6306002)(91956017)(5640700003)(6512007)(2351001)(76116006)(5660300002)(66476007)(14454004)(6506007)(53366004)(66616009)(53376002)(66066001)(53936002)(86362001)(66446008)(66556008)(66946007)(81166006)(7736002)(966005)(8936002)(36756003)(118296001)(8676002)(71200400001)(71190400001)(68736007)(99286004)(486006)(99936001)(26005)(2616005)(476003)(3846002)(256004)(81156014)(6916009)(6116002)(186003)(316002)(305945005)(102836004); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR18MB0985; H:DM5PR18MB1499.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: suse.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: wcFRB4c/UBVqq8eenb+vnLu6L/A4XeLYiKgDkspvaHqekBRQvedEX5ZDbkHm7uy+r/QMSd5dmPv4N+Ua5hrU2miXzbNhRAxGF6t+XaeZKhzrJEZr8A7FPtE8CDKdk8uDmt0oasCZGKgK7f4Q+zUzcz0Z11IE0FtaM9f+liu9+efpBUQE/5iy5si3iXD20K/zn3RFcTX/SiDas0fFAGOjWoOtSa/grTPSRjyC97bmdHP+zDKcuvqiZ3TWrzgcilVUt3Asmq4BAc/+ot9AizUp3VPwaWH1HPKxBB7SAaF3fUcUeZggQ6ETRD/pGodJRp+bzbVLM1XXJYpNi3sE0S40HJ/APcdLMfOfhx8oThyx6I1xSvRbLV+bawNMhqfW3zOfgx5J2fMKdy5qhg8h+6rWtT5SHWK8N0MqnA5NstoTOKM= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 591c8e79-acae-496d-502a-08d711633ac4 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jul 2019 00:50:18.0732 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: dfaggioli@suse.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR18MB0985 X-OriginatorOrg: suse.com Subject: [Xen-devel] Failing to build test-cpu-policy.c with GCC9 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: "Andrew.Cooper3@citrix.com" Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hey, Andy, openSUSE Tumbleweed has: gcc version 9.1.1 20190703 And this fails to build test-cpu-policy.c, like this: test-cpu-policy.c: In function ‘main’: test-cpu-policy.c:64:18: error: ‘%.12s’ directive argument is not a nul-terminated string [-Werror=format-overflow=] 64 | fail(" Test '%.12s', expected vendor %u, got %u\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ test-cpu-policy.c:20:12: note: in definition of macro ‘fail’ 20 | printf(fmt, ##__VA_ARGS__); \ | ^~~ test-cpu-policy.c:64:27: note: format string is defined here 64 | fail(" Test '%.12s', expected vendor %u, got %u\n", | ^~~~~ test-cpu-policy.c:44:7: note: referenced argument declared here 44 | } tests[] = { | Even just doing something like below, seems to fix it for me, but there probably are better ways... Regards diff --git a/tools/tests/cpu-policy/test-cpu-policy.c b/tools/tests/cpu-policy/test-cpu-policy.c index ca3b8dd45f..e0c2c56154 100644 --- a/tools/tests/cpu-policy/test-cpu-policy.c +++ b/tools/tests/cpu-policy/test-cpu-policy.c @@ -35,7 +35,7 @@ static void test_vendor_identification(void) { static const struct test { union { - char ident[12]; + char ident[13]; struct { uint32_t b, d, c; };