All of lore.kernel.org
 help / color / mirror / Atom feed
From: Claudio Fontana <claudio.fontana@huawei.com>
To: Will Deacon <will.deacon@arm.com>,
	Andre Przywara <andre.przywara@arm.com>
Cc: Szabolcs Nagy <Szabolcs.Nagy@arm.com>,
	Marc Zyngier <Marc.Zyngier@arm.com>,
	"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH 07/12] util/util.c: avoid clang error on vsnprintf
Date: Mon, 20 Jul 2015 16:28:44 +0200	[thread overview]
Message-ID: <55AD059C.6010701@huawei.com> (raw)
In-Reply-To: <20150717165028.GE8055@arm.com>

On 17.07.2015 18:50, Will Deacon wrote:
> 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 <andre.przywara@arm.com>
>> ---
>>  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 <sys/stat.h>
>>  #include <sys/statfs.h>
>>  
>> +#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
> _______________________________________________
> kvmarm mailing list
> kvmarm@lists.cs.columbia.edu
> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
> 

Hi,

what about adding -Wno-format-nonliteral to the CFLAGS when compiling with clang?

This could be set up by configure script or equivalent mechanism, ..?

Ciao,

Claudio

  reply	other threads:[~2015-07-20 14:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17 16:02 [PATCH 00/12] kvmtool: Improve portability Andre Przywara
2015-07-17 16:02 ` [PATCH 01/12] avoid casts when initializing structures Andre Przywara
2015-07-17 16:02 ` [PATCH 02/12] qcow: fix signedness bugs Andre Przywara
2015-07-17 16:02 ` [PATCH 03/12] kvm-ipc: use proper type for file descriptor Andre Przywara
2015-07-17 16:02 ` [PATCH 04/12] Makefile: remove unneeded -s switch on compiling BIOS files Andre Przywara
2015-07-17 16:02 ` [PATCH 05/12] ui: remove pointless double const in keymap declarations Andre Przywara
2015-07-17 16:02 ` [PATCH 06/12] kvm__set_dir(): avoid variable arguments call Andre Przywara
2015-07-17 16:49   ` Will Deacon
2015-07-17 16:02 ` [PATCH 07/12] util/util.c: avoid clang error on vsnprintf Andre Przywara
2015-07-17 16:50   ` Will Deacon
2015-07-20 14:28     ` Claudio Fontana [this message]
2015-07-20 14:46       ` Andre Przywara
2015-07-17 16:02 ` [PATCH 08/12] Fix call to connect() Andre Przywara
2015-07-17 16:02 ` [PATCH 09/12] use <poll.h> instead of <sys/poll.h> Andre Przywara
2015-07-17 16:02 ` [PATCH 10/12] check for and use C library provided strlcpy and strlcat Andre Przywara
2015-07-17 16:02 ` [PATCH 11/12] avoid using predefined PAGE_SIZE Andre Przywara
2015-07-17 16:47   ` Szabolcs Nagy
2015-07-17 16:02 ` [PATCH 12/12] remove KVM_CAP_MAX_VCPUS hack Andre Przywara
2015-07-17 16:52 ` [PATCH 00/12] kvmtool: Improve portability Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55AD059C.6010701@huawei.com \
    --to=claudio.fontana@huawei.com \
    --cc=Marc.Zyngier@arm.com \
    --cc=Szabolcs.Nagy@arm.com \
    --cc=andre.przywara@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.