http: fix memory leak
[vpp.git] / src / CMakeLists.txt
index fb4463e..4ef4259 100644 (file)
@@ -59,6 +59,14 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU")
   if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL GCC_STRING_OVERFLOW_WARNING_DISABLE_VERSION)
     add_compile_options(-Wno-stringop-overflow)
   endif()
+  set(GCC_STRING_OVERREAD_WARNING_DISABLE_VERSION 12.0.0)
+  if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL GCC_STRING_OVERREAD_WARNING_DISABLE_VERSION)
+    add_compile_options(-Wno-stringop-overread)
+  endif()
+  set(GCC_ARRAY_BOUNDS_WARNING_DISABLE_VERSION 12.0.0)
+  if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL GCC_ARRAY_BOUNDS_WARNING_DISABLE_VERSION)
+    add_compile_options(-Wno-array-bounds)
+  endif()
 else()
   message(WARNING "WARNING: Unsupported C compiler `${CMAKE_C_COMPILER_ID}` is used")
   set (PRINT_MIN_C_COMPILER_VER TRUE)
@@ -127,6 +135,7 @@ elseif (${CMAKE_BUILD_TYPE_LC} MATCHES "coverity")
 elseif (${CMAKE_BUILD_TYPE_LC} MATCHES "gcov")
   add_compile_options(-O0 -fprofile-arcs -ftest-coverage)
   add_compile_definitions(CLIB_DEBUG CLIB_GCOV)
+  link_libraries(gcov)
 endif()
 
 set(BUILD_TYPES release debug coverity gcov)