From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web11.171755.1680819862784556678 for ; Thu, 06 Apr 2023 15:24:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bsdio.com header.s=fm3 header.b=HO3rdZuL; spf=pass (domain: bsdio.com, ip: 66.111.4.29, mailfrom: rebecca@bsdio.com) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 1F61C5C01D1; Thu, 6 Apr 2023 18:24:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 06 Apr 2023 18:24:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1680819862; x= 1680906262; bh=iB8S/WW4qlf9A4JVIfoU3eJ+w/FPdem9UQIdbyplKxI=; b=H O3rdZuLv9dYLNDOHOm1O01WzEP099y0UTINoKRK6X4FCH34mCWiIEM3yXSqH/HMk WHrYLeU7PNkGdPZfeQhgK2HX1LLc+kshAAiCYGLdls1Xd+4lajDGhHk75e0v6J4a GWR4k0+ZhORPX+69wOEpx7F3VkipOuH9D+YGpxgJ4+ReqOumzjaF6bEnyVQ4eFeI H7MBLRLonGggy70sBAIyzb4A7CEcfj6CnpUQtF/gyM8uAqEzWEBLMzZoah7byWhF GUNWsoTK3c0mMlAhcMOKsJUTkYB6P9N0TIY4WgWL69EPmTxS33hY9EPXE+nK5BFE ipntC9aPD5ZcUAj6vrSyw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1680819862; x= 1680906262; bh=iB8S/WW4qlf9A4JVIfoU3eJ+w/FPdem9UQIdbyplKxI=; b=E e90TfAEFPQJg715QWhnMHwubwYwyKPADEvq90cpessqyvSVPwgUF7CqTCbw579vW zLSqwg2RLljRk8vLUKdoPDoj0TUoSwVLGDMKYT3vd1pqqoru02Y5vVhIzHs9uxuO gzBgcHW3LEdXNWi6+bPzgGGzxiGjnDjexPpCLNQ3DBswjcGOB1NenOq9unnyrShs q2E+eAb9dCZ1OI+d8rNyWFKw+aFtYDTMSc8bk7G4epkMt9J+aaHfsIz5mM+DN4c0 JIcBOcgaFe1xaQbtbalS1XAXolCobgDtTzWd2M/loRVbhokYhqg45GXjIk9C1o+R quxRUBdEm0VtqU5t/EV5A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:24:18 -0400 (EDT) From: "Rebecca Cran" To: devel@edk2.groups.io, Liming Gao , Michael D Kinney , Guomin Jiang , Wei6 Xu , Guo Dong , Ray Ni , Sean Rhodes , James Lu , Gua Guo , Andrew Fish , Hao A Wu , Maciej Rabeda , Siyuan Fu , Jiewen Yao , Jian J Wang , Xiaoyu Lu , Ard Biesheuvel , Sami Mujawar , Supreeth Venkatesh , Michael Kubacki , Nate DeSimone , Sean Brogan Cc: Rebecca Cran , Leif Lindholm , Abner Chang , Nickle Wang , Igor Kulchytskyy , Daniel Schaefer , Min Xu , Jordan Justen , Gerd Hoffmann , Peter Grehan , Erdem Aktas , James Bottomley , Tom Lendacky , Michael Roth , Sunil V L , Andrei Warkentin Subject: [PATCH 13/18] CryptoPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:14 -0600 Message-Id: <20230406222319.2281263-14-rebecca@bsdio.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230406222319.2281263-1-rebecca@bsdio.com> References: <20230406222319.2281263-1-rebecca@bsdio.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout CryptoPkg. Visual Studio versions before VS 2015 don't support __func__ and so will fail to compile. A workaround is to define __func__ as __FUNCTION__ : #define __func__ __FUNCTION__ Signed-off-by: Rebecca Cran --- CryptoPkg/Library/TlsLib/TlsConfig.c | 8 ++++---- CryptoPkg/Library/TlsLib/TlsProcess.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CryptoPkg/Library/TlsLib/TlsConfig.c b/CryptoPkg/Library/TlsLib/TlsConfig.c index 60559de4a7f3..fdda73690ae5 100644 --- a/CryptoPkg/Library/TlsLib/TlsConfig.c +++ b/CryptoPkg/Library/TlsLib/TlsConfig.c @@ -331,7 +331,7 @@ TlsSetCipherList ( DEBUG_VERBOSE, "%a:%a: skipping CipherId=0x%04x\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, CipherId[Index] )); // @@ -380,7 +380,7 @@ TlsSetCipherList ( DEBUG_ERROR, "%a:%a: no CipherId could be mapped\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); Status = EFI_UNSUPPORTED; goto FreeMappedCipher; @@ -441,7 +441,7 @@ TlsSetCipherList ( DEBUG_VERBOSE, "%a:%a: CipherString={\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); for (CipherStringPosition = CipherString; CipherStringPosition < CipherString + FullLength; @@ -610,7 +610,7 @@ TlsSetVerifyHost ( "%a:%a: parsed \"%a\" as an IPv%c address " "literal\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, HostName, (UINTN)((BinaryAddressSize == NS_IN6ADDRSZ) ? '6' : '4') )); diff --git a/CryptoPkg/Library/TlsLib/TlsProcess.c b/CryptoPkg/Library/TlsLib/TlsProcess.c index a803d86c4f4e..db296053fd2c 100644 --- a/CryptoPkg/Library/TlsLib/TlsProcess.c +++ b/CryptoPkg/Library/TlsLib/TlsProcess.c @@ -127,7 +127,7 @@ TlsDoHandshake ( DEBUG (( DEBUG_ERROR, "%a SSL_HANDSHAKE_ERROR State=0x%x SSL_ERROR_%a\n", - __FUNCTION__, + __func__, SSL_get_state (TlsConn->Ssl), Ret == SSL_ERROR_SSL ? "SSL" : Ret == SSL_ERROR_SYSCALL ? "SYSCALL" : "ZERO_RETURN" )); @@ -141,7 +141,7 @@ TlsDoHandshake ( DEBUG (( DEBUG_ERROR, "%a ERROR 0x%x=L%x:F%x:R%x\n", - __FUNCTION__, + __func__, ErrorCode, ERR_GET_LIB (ErrorCode), ERR_GET_FUNC (ErrorCode), -- 2.34.1