From nobody Tue May 7 23:08:16 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; dkim=fail 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 1495820976837715.6062718788697; Fri, 26 May 2017 10:49:36 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 58CC3C057FA6; Fri, 26 May 2017 17:49:34 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 60A115C54F; Fri, 26 May 2017 17:49:33 +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 E999F4BB7F; Fri, 26 May 2017 17:49:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v4QHnUM5026002 for ; Fri, 26 May 2017 13:49:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0C2AE80689; Fri, 26 May 2017 17:49:30 +0000 (UTC) Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0661B80686 for ; Fri, 26 May 2017 17:49:26 +0000 (UTC) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BC6D761980 for ; Fri, 26 May 2017 17:49:24 +0000 (UTC) Received: by mail-lf0-f66.google.com with SMTP id m18so1557368lfj.0 for ; Fri, 26 May 2017 10:49:24 -0700 (PDT) Received: from localhost.localdomain ([213.147.221.70]) by smtp.gmail.com with ESMTPSA id 75sm306292lja.53.2017.05.26.10.49.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 May 2017 10:49:22 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 58CC3C057FA6 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.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 58CC3C057FA6 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TOe7PC6N" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BC6D761980 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=bogorodskiy@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BC6D761980 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=5spfvoxxPzyTClLGJN0UdKjbEc5o3F7rYDOt66KChUc=; b=TOe7PC6NLhFgjVuMKstSLki644IvZrmtB9J3Te5d8W7mCmrSbLOxOPaw+bUzFJ+poh Ly4nnRc/VhrqV25ujqh2jbHvhSwZe+FkDFVRR9AXrJ2v6J9nYKDeG6F8mayHLdV58mKV 1v4/MEjhh20bP4YUq4n1t1GJEhubOk0I8fpg4qNRYw/MW/rdXsjlCZetNCmaerfJgrKL mspvkrPZe2CnhfMEctm6ZKBgGgjD5G3nx4llKUX3+7vOr3UjPaoBMhQQeOfkF99MLrx7 r1Ot7DD9RMUC2kwmfH6WQhc9H2kma+wwC0Bd6WirCir1K5tVPOu3spL2XK8X0Mmr2n2U RecA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5spfvoxxPzyTClLGJN0UdKjbEc5o3F7rYDOt66KChUc=; b=h8rYte+hDBT3c4L6zcG0HVTlnRIx/ygaFoHAaeappnHmeMON4gZi0JyFl5ANlFp4bs 5a3kfdshdIpZK8Hr2k0GMvXZfHDWk2q528tCsk2OArA2T6k1HXslUYnpm3blv5zQAjVy PKaIwECBRARMcsJww2esoXYi3gPoesANXT/fUA92DsCAgHjW5KDB5ss0PMobdB1ulA1C 5kMbLQL06ZaA7JPdjskM/LawybtIkCw8/tzOBqhtxtXN/7trIV/fMHrFAaBBoJzI5GkW nxZiLgGViZ6i0nNOCVqDW3ZsQmekRhybCM+LTO1vIono5yO5qj4KFAesrxPL0YuoN2k3 gXKQ== X-Gm-Message-State: AODbwcAvcVwxK16/yQBpO+5qQKQX94Va76X4ONG8Pi30jad4iHyR96Rs qVQhM4RE5pdFYTbG X-Received: by 10.46.1.151 with SMTP id f23mr1034911lji.97.1495820962939; Fri, 26 May 2017 10:49:22 -0700 (PDT) From: Roman Bogorodskiy To: libvir-list@redhat.com Date: Fri, 26 May 2017 21:49:15 +0400 Message-Id: <20170526174915.69095-1-bogorodskiy@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 26 May 2017 17:49:25 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 26 May 2017 17:49:25 +0000 (UTC) for IP:'209.85.215.66' DOMAIN:'mail-lf0-f66.google.com' HELO:'mail-lf0-f66.google.com' FROM:'bogorodskiy@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.17 * (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.215.66 mail-lf0-f66.google.com 209.85.215.66 mail-lf0-f66.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Roman Bogorodskiy Subject: [libvirt] [PATCH] virsh: ignore readline -Wstrict-prototypes warning 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 26 May 2017 17:49:35 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When building with clang 4.0.0, virsh build fails like this: gmake[3]: Entering directory '/usr/home/novel/code/libvirt/tools' CC virsh-virsh.o In file included from virsh.c:45: In file included from /usr/local/include/readline/readline.h:31: /usr/local/include/readline/rltypedefs.h:35:22: error: this function declar= ation is not a prototype [-Werror,-Wstrict-prototypes] typedef int Function () __attribute__ ((deprecated)); ^ void /usr/local/include/readline/rltypedefs.h:36:24: error: this function declar= ation is not a prototype [-Werror,-Wstrict-prototypes] typedef void VFunction () __attribute__ ((deprecated)); ^ void /usr/local/include/readline/rltypedefs.h:37:26: error: this function declar= ation is not a prototype [-Werror,-Wstrict-prototypes] typedef char *CPFunction () __attribute__ ((deprecated)); ^ void /usr/local/include/readline/rltypedefs.h:38:28: error: this function declar= ation is not a prototype [-Werror,-Wstrict-prototypes] typedef char **CPPFunction () __attribute__ ((deprecated)); ^ void In file included from virsh.c:45: /usr/local/include/readline/readline.h:385:23: error: this function declara= tion is not a prototype [-Werror,-Wstrict-prototypes] extern int rl_message (); ^ void 5 errors generated. gmake[3]: *** [Makefile:2823: virsh-virsh.o] Error 1 Fix that by adding VIR_WARNINGS_NO_STRICT_PROTOTYPES macro that uses "GCC diagnostic push" to ignore -Wstrict-prototypes and wrapping readline includes with it and VIR_WARNINGS_RESET. Bug report on the readline mailing list: http://lists.gnu.org/archive/html/bug-readline/2017-05/msg00004.html --- src/internal.h | 4 ++++ tools/virsh.c | 2 ++ tools/virt-admin.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/internal.h b/src/internal.h index 03a973ccd..57b6da7ff 100644 --- a/src/internal.h +++ b/src/internal.h @@ -266,6 +266,10 @@ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"") =20 +# define VIR_WARNINGS_NO_STRICT_PROTOTYPES \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wstrict-prototypes\"") + # if HAVE_SUGGEST_ATTRIBUTE_FORMAT # define VIR_WARNINGS_NO_PRINTF \ _Pragma ("GCC diagnostic push") \ diff --git a/tools/virsh.c b/tools/virsh.c index 1f5c2b11c..1a28a2620 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -41,8 +41,10 @@ #include =20 #if WITH_READLINE +VIR_WARNINGS_NO_STRICT_PROTOTYPES # include # include +VIR_WARNINGS_RESET #endif =20 #include "internal.h" diff --git a/tools/virt-admin.c b/tools/virt-admin.c index 0fa1c000c..7ad4c29e1 100644 --- a/tools/virt-admin.c +++ b/tools/virt-admin.c @@ -27,8 +27,10 @@ #include =20 #if WITH_READLINE +VIR_WARNINGS_NO_STRICT_PROTOTYPES # include # include +VIR_WARNINGS_RESET #endif =20 #include "internal.h" --=20 2.13.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list