Skip to content

Commit

Permalink
Disable "address-of-packed-member" compiler warnings
Browse files Browse the repository at this point in the history
This warning spammed a lot and mostly related to ip address alignment in
packed structures which is part of VPP and we can't control it much.
For now disable it, because spam of this warning makes it impossible to
analyze other warnings which has a lot of really important ones.
  • Loading branch information
mogaika committed Feb 1, 2024
1 parent 5bfcb66 commit 4db3f30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ endif (NOT CMAKE_BUILD_TYPE)
SET(UPF_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} CACHE STRING "upf_install_prefix")

if (CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -march=corei7 -mtune=corei7-avx -O3 -g")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -Wno-address-of-packed-member -march=corei7 -mtune=corei7-avx -O3 -g")
elseif (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -march=corei7 -mtune=corei7-avx -O0 -g")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wno-address-of-packed-member -march=corei7 -mtune=corei7-avx -O0 -g")
add_definitions(-DCLIB_DEBUG -DVLIB_BUFFER_TRACE_TRAJECTORY -fPIC -fstack-protector-all)
endif()

Expand Down

0 comments on commit 4db3f30

Please sign in to comment.