Displaying 1 result from an estimated 1 matches for "incompatible_cast".
2013 Sep 12
6
[PATCH] RFC xen: suppress Coverity warnings about atomic_read and atomic_set.
.../xen/include/asm-x86/atomic.h
@@ -70,7 +70,11 @@ typedef struct { int counter; } atomic_t;
* Atomically reads the value of @v.
*/
#define _atomic_read(v) ((v).counter)
-#define atomic_read(v) read_atomic(&((v)->counter))
+static inline int atomic_read(atomic_t *v)
+{
+ /* coverity[incompatible_cast : FALSE] */
+ return read_atomic(&v->counter);
+}
/**
* atomic_set - set atomic variable
@@ -80,7 +84,11 @@ typedef struct { int counter; } atomic_t;
* Atomically sets the value of @v to @i.
*/
#define _atomic_set(v,i) (((v).counter) = (i))
-#define atomic_set(v,i) write_atomi...