Eliminate 'function is never used' cppcheck warning for calloc/realloc
authorIvan Maidanski <ivmai@mail.ru>
Fri, 23 Nov 2018 18:36:20 +0000 (21:36 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 23 Nov 2018 18:36:20 +0000 (21:36 +0300)
* tests/test.c [TEST_WITH_SYSTEM_MALLOC] (run_one_test): Call calloc(),
realloc() and free().

tests/test.c

index 17ba8a8..e947dda 100644 (file)
@@ -1557,6 +1557,10 @@ void run_one_test(void)
 #     endif
 #   endif /* DBG_HDRS_ALL */
     tree_test();
+#   ifdef TEST_WITH_SYSTEM_MALLOC
+      free(calloc(1,1));
+      free(realloc(NULL, 64));
+#   endif
 #   ifndef NO_CLOCK
       if (print_stats) {
         CLOCK_TYPE tree_time;