]> granicus.if.org Git - gc/commitdiff
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>
Mon, 26 Nov 2018 08:23:41 +0000 (11:23 +0300)
* tests/test.c [TEST_WITH_SYSTEM_MALLOC] (run_one_test): Call calloc(),
realloc() and free().

tests/test.c

index 3d70d3d148c181cfe96430c08f1096c37dfbf84a..fdfce804671ae8608f9a30632c731d86e9df776c 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;