ipmctl: fix build with gcc12

Ignore warnings generated with gcc12 for now.

    | /ipmctl/03.00.00.0438-r0/git/DcpmPkg/cli/NvmDimmCli.c: In function 'showHelp':
    | /ipmctl/03.00.00.0438-r0/git/DcpmPkg/cli/NvmDimmCli.c:1031:24: error: the comparison will always evaluate as 'true' for the address of 'options' will never be NULL [-Werror=address]
    | 1031 | (pCmd->options != NULL)) {
    | | ^~
    | compilation terminated due to -Wfatal-errors.
    | cc1: all warnings being treated as errors

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
This commit is contained in:
Anuj Mittal 2022-05-18 12:27:22 +08:00
parent 6d7dbf9204
commit 45a43b1b8c
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,38 @@
From ef56be8e6bf2ea273cbeb960f3131164e7b517b6 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Wed, 18 May 2022 12:24:03 +0800
Subject: [PATCH] CMakeLists: disable Werror
gcc12 highlights minor warnings that cause the build to fail. Ignore
those until they aren't fixed upstream.
Upstream-Status: Inappropriate
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 418483f7..c019fea0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -146,7 +146,7 @@ else()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fno-strict-aliasing -D_FORTIFY_SOURCE=2")
if(LNX_BUILD)
#A few warnings yet to resolve under esx
- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Werror")
+ #set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Werror")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Werror")
endif()
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -ggdb")
@@ -791,4 +791,4 @@ if(ESX_BUILD)
include(CMake/esx.cmake)
endif()
-add_subdirectory(src/os/nvm_api_sample)
\ No newline at end of file
+add_subdirectory(src/os/nvm_api_sample)
--
2.35.3

View File

@ -18,6 +18,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=72b9da60da6219d612ce30b746a0fe71 \
SRC_URI = "git://github.com/intel/ipmctl.git;protocol=https;branch=development;name=ipmctl; \ SRC_URI = "git://github.com/intel/ipmctl.git;protocol=https;branch=development;name=ipmctl; \
git://github.com/tianocore/edk2.git;protocol=https;name=edk2;destsuffix=git/edk2;branch=master \ git://github.com/tianocore/edk2.git;protocol=https;name=edk2;destsuffix=git/edk2;branch=master \
file://0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch;patchdir=edk2 \ file://0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch;patchdir=edk2 \
file://0001-CMakeLists-disable-Werror.patch \
" "
SRCREV_ipmctl = "99188a69a82409f6759e8bfdff8fd71840e851fc" SRCREV_ipmctl = "99188a69a82409f6759e8bfdff8fd71840e851fc"