From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH 07/12] util/util.c: avoid clang error on vsnprintf Date: Fri, 17 Jul 2015 17:50:28 +0100 Message-ID: <20150717165028.GE8055@arm.com> References: <1437148938-5394-1-git-send-email-andre.przywara@arm.com> <1437148938-5394-8-git-send-email-andre.przywara@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "kvm@vger.kernel.org" , Szabolcs Nagy , Marc Zyngier , "kvmarm@lists.cs.columbia.edu" To: Andre Przywara Return-path: Received: from foss.arm.com ([217.140.101.70]:49949 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752456AbbGQQub (ORCPT ); Fri, 17 Jul 2015 12:50:31 -0400 Content-Disposition: inline In-Reply-To: <1437148938-5394-8-git-send-email-andre.przywara@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Jul 17, 2015 at 05:02:13PM +0100, Andre Przywara wrote: > clang by default doesn't seem to like printf calls with non-literal > format strings. > Add the proper pragma to disable this warning in the report function > to make kvmtool compile with clang. Despite its GCC name, clang also > accepts this. > > Signed-off-by: Andre Przywara > --- > util/util.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/util/util.c b/util/util.c > index 1877105..825da3f 100644 > --- a/util/util.c > +++ b/util/util.c > @@ -10,6 +10,7 @@ > #include > #include > > +#pragma GCC diagnostic ignored "-Wformat-nonliteral" Urgh! I think we need to figure out a better way to keep clang happy in this regard, if we decide that we care about building with it. Will