From: Ian Campbell Subject: Re: [PATCH] RFC xen: suppress Coverity warnings about atomic_read and atomic_set. Date: Thu, 12 Sep 2013 15:14:03 +0100 Message-ID: <1378995243.10076.68.camel@kazak.uk.xensource.com> References: <1378993643-13345-1-git-send-email-tim@xen.org> <5231E68E02000078000F2C72@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VK7ez-000804-V7 for xen-devel@lists.xenproject.org; Thu, 12 Sep 2013 14:14:18 +0000 In-Reply-To: <5231E68E02000078000F2C72@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Tim Deegan List-Id: xen-devel@lists.xenproject.org On Thu, 2013-09-12 at 15:06 +0100, Jan Beulich wrote: > >>> On 12.09.13 at 15:47, Tim Deegan 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.