From nobody Sat Nov 2 12:15:15 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1490979952997888.5838486029189; Fri, 31 Mar 2017 10:05:52 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id F3A5320D2C3BB; Fri, 31 Mar 2017 10:05:48 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5163421A0482F for ; Fri, 31 Mar 2017 10:05:47 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Mar 2017 10:05:45 -0700 Received: from shwde6388.ccr.corp.intel.com ([10.239.9.17]) by fmsmga004.fm.intel.com with ESMTP; 31 Mar 2017 10:05:41 -0700 X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490979947; x=1522515947; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=ckkFAinb5SIdfjREMgcusNyO/1iRNgWz0HFNCkyOg/o=; b=KFGPXZuaytBxMsmu4J9kYFc6C+T5GiDofGpfPiyoXFcFBoHvLVetxjir 8h8UM0L9wpck3ED2Ni6DAKgz/V3iuA==; X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,252,1486454400"; d="scan'208";a="242519923" From: Qin Long To: edk2-devel@lists.01.org Date: Sat, 1 Apr 2017 01:05:14 +0800 Message-Id: <20170331170517.4672-2-qin.long@intel.com> X-Mailer: git-send-email 2.12.2.windows.1 In-Reply-To: <20170331170517.4672-1-qin.long@intel.com> References: <20170331170517.4672-1-qin.long@intel.com> Subject: [edk2] [Patch 1/4] CryptoPkg/OpensslLib: Suppress extra build warnings in openssl source X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ting.ye@intel.com, hao.a.wu@intel.com, feng.tian@intel.com, lersek@redhat.com, eric.dong@intel.com MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch added some extra build options to suppress possible warnings when building openssl source under GCC48 and VS2010. Including: Adding "-Wno-error=3Dmaybe-uninitialized" to suppress the following GCC48 build warning: OpensslLib/openssl/ssl/statem/statem_clnt.c:2543:9: error: "len" may be used uninitialized in this function [-Werror=3Dmaybe-uninitialized] len +=3D pskhdrlen; ^ And adding "/wd4306" to suppress the following VS2010 build warning: openssl\crypto\asn1\tasn_dec.c(795) : warning C4306: 'type cast' : conversion from 'int' to 'ASN1_VALUE *' of greater size Cc: Ting Ye Cc: Hao Wu Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qin Long --- CryptoPkg/Library/OpensslLib/OpensslLib.inf | 15 ++++++++++----- CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 15 ++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Librar= y/OpensslLib/OpensslLib.inf index 42f72f4f1f..cbabb34bdd 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -535,21 +535,26 @@ # C4244: conversion from type1 to type2, possible loss of data # C4245: conversion from type1 to type2, signed/unsigned mismatch # C4267: conversion from size_t to type, possible loss of data + # C4306: 'identifier' : conversion from 'type1' to 'type2' of greater = size # C4389: 'operator' : signed/unsigned mismatch (xxxx) # C4702: unreachable code # C4706: assignment within conditional expression # MSFT:*_*_IA32_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAG= S) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706 - MSFT:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAG= S) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706 - MSFT:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAG= S) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706 + MSFT:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAG= S) /wd4090 /wd4244 /wd4245 /wd4267 /wd4306 /wd4389 /wd4702 /wd4706 + MSFT:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAG= S) /wd4090 /wd4244 /wd4245 /wd4267 /wd4306 /wd4389 /wd4702 /wd4706 =20 INTEL:*_*_IA32_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPEN= SSL_FLAGS) /w INTEL:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPEN= SSL_FLAGS) /w INTEL:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPEN= SSL_FLAGS) /w =20 - GCC:*_*_IA32_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) - GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -DNO_MSA= BI_VA_FUNCS - GCC:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) + # + # Suppress the following build warnings in openssl so we don't break the= build with -Werror + # -Werror=3Dmaybe-uninitialized: there exist some other paths for whic= h the variable is not initialized. + # + GCC:*_*_IA32_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized + GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -DNO_MSABI_VA_FUNCS + GCC:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized GCC:*_*_ARM_CC_FLAGS =3D $(OPENSSL_FLAGS) GCC:*_*_AARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) =20 diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/= Library/OpensslLib/OpensslLibCrypto.inf index cbbb456d70..026b551bca 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf @@ -496,21 +496,26 @@ # C4244: conversion from type1 to type2, possible loss of data # C4245: conversion from type1 to type2, signed/unsigned mismatch # C4267: conversion from size_t to type, possible loss of data + # C4306: 'identifier' : conversion from 'type1' to 'type2' of greater = size # C4389: 'operator' : signed/unsigned mismatch (xxxx) # C4702: unreachable code # C4706: assignment within conditional expression # MSFT:*_*_IA32_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAG= S) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706 - MSFT:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAG= S) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706 - MSFT:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAG= S) /wd4090 /wd4244 /wd4245 /wd4267 /wd4389 /wd4702 /wd4706 + MSFT:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAG= S) /wd4090 /wd4244 /wd4245 /wd4267 /wd4306 /wd4389 /wd4702 /wd4706 + MSFT:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAG= S) /wd4090 /wd4244 /wd4245 /wd4267 /wd4306 /wd4389 /wd4702 /wd4706 =20 INTEL:*_*_IA32_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPEN= SSL_FLAGS) /w INTEL:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPEN= SSL_FLAGS) /w INTEL:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPEN= SSL_FLAGS) /w =20 - GCC:*_*_IA32_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) - GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -DNO_MSA= BI_VA_FUNCS - GCC:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) + # + # Suppress the following build warnings in openssl so we don't break the= build with -Werror + # -Werror=3Dmaybe-uninitialized: there exist some other paths for whic= h the variable is not initialized. + # + GCC:*_*_IA32_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized + GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized -DNO_MSABI_VA_FUNCS + GCC:*_*_IPF_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-err= or=3Dmaybe-uninitialized GCC:*_*_ARM_CC_FLAGS =3D $(OPENSSL_FLAGS) GCC:*_*_AARCH64_CC_FLAGS =3D $(OPENSSL_FLAGS) =20 --=20 2.12.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel