summaryrefslogtreecommitdiff
path: root/compiler.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-03-13 08:44:04 -0400
committerEric S. Raymond <esr@thyrsus.com>2015-03-13 08:44:04 -0400
commitdf28d9d7f9eabd2373df031fa2939d0b41ee6caa (patch)
tree71ea48f96eeb2d42457764a0e64c0c109c92ffa7 /compiler.h
parentf0a7a853d5eac933f60b562f3b44102296c9e23f (diff)
downloadgpsd-df28d9d7f9eabd2373df031fa2939d0b41ee6caa.tar.gz
splint/cppcheck/coverity prerelease cleanup.
Diffstat (limited to 'compiler.h')
-rw-r--r--compiler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler.h b/compiler.h
index e33a4899..f0041384 100644
--- a/compiler.h
+++ b/compiler.h
@@ -46,7 +46,9 @@
#ifndef S_SPLINT_S
#ifdef HAVE_STDATOMIC_H
+#ifndef __COVERITY__ /* Coverity is confused by a GNU typedef */
#include <stdatomic.h>
+#endif /* __COVERITY__ */
#endif /* HAVE_STDATOMIC_H */
#endif /* S_SPLINT_S */
@@ -59,7 +61,9 @@ static /*@unused@*/ inline void memory_barrier(void)
{
#ifndef S_SPLINT_S
#ifdef STD_ATOMIC_H
+#ifndef __COVERITY__
atomic_thread_fence(memory_order_seq_cst);
+#endif /* __COVERITY__ */
#elif defined(HAVE_OSATOMIC_H)
OSMemoryBarrier();
#elif defined(__GNUC__)