Workaround 'obsolescent ftime called' cppcheck style warning (POSIX)
authorIvan Maidanski <ivmai@mail.ru>
Thu, 9 Mar 2017 04:53:32 +0000 (07:53 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 9 Mar 2017 04:53:32 +0000 (07:53 +0300)
* tests/test_stack.c [!NO_TIMES && (USE_WINTHREADS
|| AO_USE_WIN32_PTHREADS)] (get_msecs): Use gettimeofday-based
implementation if CPPCHECK.

tests/test_stack.c

index 0847c11..623f208 100644 (file)
@@ -53,7 +53,8 @@
 
 #ifdef NO_TIMES
 # define get_msecs() 0
-#elif defined(USE_WINTHREADS) || defined(AO_USE_WIN32_PTHREADS)
+#elif (defined(USE_WINTHREADS) || defined(AO_USE_WIN32_PTHREADS)) \
+      && !defined(CPPCHECK)
 # include <sys/timeb.h>
   unsigned long get_msecs(void)
   {