Skip to content

Commit

Permalink
build: disable "address-of-packed-member" compiler warnings (#383)
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 can be really important ones.
  • Loading branch information
mogaika authored Feb 5, 2024
1 parent eef744e commit 40ca5d1
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 @@ -159,9 +159,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 40ca5d1

Please sign in to comment.