Building the source tree with WPA_TRACE, but without WPA_TRACE_BFD and
CONFIG_TESTING_OPTIONS leads to a compilation error:
../src/utils/os_unix.c:720:19: error: redefinition of ‘testing_test_fail’
static inline int testing_test_fail(const char *tag, bool is_alloc)
^~~~~~~~~~~~~~~~~
In file included from ../src/utils/os_unix.c:26:0:
../src/utils/os.h:696:19: note: previous definition of ‘testing_test_fail’
was here
static inline int testing_test_fail(const char *tag, bool is_alloc)
^~~~~~~~~~~~~~~~~
Fix this by removing redefinition in os_unix.c since recent commit
126f243eb767 ("trace: Define TEST_FAIL and TEST_FAIL_TAG as inline
function") has added a static declaration already in os.h.
Fixes: 126f243eb767 ("trace: Define TEST_FAIL and TEST_FAIL_TAG as inline function")
Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
return -1;
#endif /* WPA_TRACE_BFD */
}
-
-#else /* defined(WPA_TRACE_BFD) && defined(CONFIG_TESTING_OPTIONS) */
-
-static inline int testing_test_fail(const char *tag, bool is_alloc)
-{
- return 0;
-}
-
-#endif
+#endif /* defined(WPA_TRACE_BFD) && defined(CONFIG_TESTING_OPTIONS) */
void * os_malloc(size_t size)
{