From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
Tim Deegan <tim@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] RFC xen: suppress Coverity warnings about atomic_read and atomic_set.
Date: Thu, 12 Sep 2013 15:17:48 +0100 [thread overview]
Message-ID: <5231CD0C.7000705@citrix.com> (raw)
In-Reply-To: <1378995243.10076.68.camel@kazak.uk.xensource.com>
On 12/09/13 15:14, Ian Campbell wrote:
> On Thu, 2013-09-12 at 15:06 +0100, Jan Beulich wrote:
>>>>> On 12.09.13 at 15:47, Tim Deegan <tim@xen.org> wrote:
>>> RFC because I'm not sure what people think about scattering coverity
>>> annotations in the code.
>> I personally dislike such tool specific annotations. What if someone
>> suggests a second tool to pass our code through? If there was
>> some standardization, that'd be a different thing...
> Could we handle this how we do different compilers:
>
> #ifdef COVERITY
> #define __false_cast_thing THE ANNOTATION
> #else...
>
> static inline void atomic_set(atomic_t *v, int i)
> {
> __false_cast_thing
> write_atomic(&v->counter, i);
>
> Although if the tools are not consistent about placement etc this won't
> help at all.
The annotations are just comments, and as there is an implication of
being able to annotate next to macro declarations, I doubt this would
have the intended effect.
I was wondering whether we can use the "model" file to specify this
annotation next to a modelled version of atomic_set() ? That way, all
Coverity gubbins would be in a single file unreferenced by anything else.
~Andrew
next prev parent reply other threads:[~2013-09-12 14:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 13:47 [PATCH] RFC xen: suppress Coverity warnings about atomic_read and atomic_set Tim Deegan
2013-09-12 14:06 ` Jan Beulich
2013-09-12 14:14 ` Ian Campbell
2013-09-12 14:17 ` Andrew Cooper [this message]
2013-09-12 14:23 ` Tim Deegan
2013-09-13 7:27 ` Tim Deegan
2013-09-12 14:32 ` Matthew Daley
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=5231CD0C.7000705@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.org \
/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.