summaryrefslogtreecommitdiff
path: root/compiler.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-03-30 17:10:53 -0400
committerEric S. Raymond <esr@thyrsus.com>2015-03-30 17:10:53 -0400
commit28bf37132d86cc59320e21d843960d086cef664c (patch)
treebf085b5f89f1d1061b6a88ecc66c50721b13d86c /compiler.h
parentecb7e1ff3ec73000918c56861c55258c2d4deada (diff)
downloadgpsd-28bf37132d86cc59320e21d843960d086cef664c.tar.gz
Retire splint from our set of static analyzers.
The proximate cause was that we've been seing emission of error messages that were randomly and disturbingly variable across different environments - notably Raspbian and Gentoo splint gave nontrivially different results than Ubuntu 14.10 splint. And this was *not* due to Ubuntu patches! A pristine splint built from the 3.1.2 tarball on Ubuntu didn't match the Raspbian and Gentoo results either. But this has been coming for a while. Easy access to more modern static analyzers such as coverity, scan-build and cppcheck has been decreasing the utility of splint, which is unmaintained and somewhat buggy and not easy to use. Only file not cleaned is ppsthread.c, because Gary has been working on it during this cleanup. All regression tests pass. PPS observed live on GR601-W.
Diffstat (limited to 'compiler.h')
-rw-r--r--compiler.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler.h b/compiler.h
index 53902dc2..837c9354 100644
--- a/compiler.h
+++ b/compiler.h
@@ -65,22 +65,19 @@
assert(locresult != -23); \
} while (0)
-#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 */
#ifdef HAVE_OSATOMIC_H
#include <libkern/OSAtomic.h>
#endif /* HAVE_STDATOMIC_H */
-static /*@unused@*/ inline void memory_barrier(void)
+static inline void memory_barrier(void)
/* prevent instruction reordering across any call to this function */
{
-#ifndef S_SPLINT_S
#ifdef _STDATOMIC_H
#ifndef __COVERITY__
atomic_thread_fence(memory_order_seq_cst);
@@ -90,7 +87,6 @@ static /*@unused@*/ inline void memory_barrier(void)
#elif defined(__GNUC__)
asm volatile ("" : : : "memory");
#endif /* STD_ATOMIC_H */
-#endif /* S_SPLINT_S */
}
#endif /* _GPSD_COMPILER_H_ */