* src/atomic_ops.h [AO_CAN_EMUL_CAS]: Include emul_cas.h also if
CPPCHECK (to define AO_store_full as AO_store_full_emulation).
* tests/test_atomic_include.template [CPPCHECK] (list_atomicXX,
char_list_atomicXX, short_list_atomicXX, int_list_atomicXX,
double_list_atomicXX): Declare function.
* tests/test_atomic_include.template test_atomicXX (test_atomicXX):
Call list_atomicXX, char_list_atomicXX, short_list_atomicXX,
int_list_atomicXX and double_list_atomicXX if CPPCHECK.
# define AO_CAN_EMUL_CAS
#endif
-#if defined(AO_REQUIRE_CAS) && !defined(AO_HAVE_compare_and_swap) \
+#if (defined(AO_REQUIRE_CAS) && !defined(AO_HAVE_compare_and_swap) \
&& !defined(AO_HAVE_fetch_compare_and_swap) \
&& !defined(AO_HAVE_compare_and_swap_full) \
&& !defined(AO_HAVE_fetch_compare_and_swap_full) \
&& !defined(AO_HAVE_compare_and_swap_acquire) \
- && !defined(AO_HAVE_fetch_compare_and_swap_acquire)
+ && !defined(AO_HAVE_fetch_compare_and_swap_acquire)) || defined(CPPCHECK)
# if defined(AO_CAN_EMUL_CAS)
# include "atomic_ops/sysdeps/emul_cas.h"
# elif !defined(CPPCHECK)
#define MISSING(name) \
printf("Missing: %s\n", #name "XX")
+#if defined(CPPCHECK)
+ void list_atomicXX(void);
+ void char_list_atomicXX(void);
+ void short_list_atomicXX(void);
+ void int_list_atomicXX(void);
+ void double_list_atomicXX(void);
+#endif
+
void test_atomicXX(void)
{
AO_t x;
w.AO_val2 = 0;
# endif
+# if defined(CPPCHECK)
+ list_atomicXX();
+ char_list_atomicXX();
+ short_list_atomicXX();
+ int_list_atomicXX();
+ double_list_atomicXX();
+# endif
# if defined(AO_HAVE_nopXX)
AO_nopXX();
# elif !defined(AO_HAVE_nop) || !defined(AO_HAVE_nop_full) \