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.171756.1680819866163298743 for ; Thu, 06 Apr 2023 15:24:26 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm3 header.b=Jk4/OAkk; spf=pass (domain: bsdio.com, ip: 66.111.4.29, mailfrom: rebecca@bsdio.com) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7DDFA5C01DF; Thu, 6 Apr 2023 18:24:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 06 Apr 2023 18:24:25 -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=1680819865; x= 1680906265; bh=WMyAC+JeTz0scrCYjJsiEe8BeyunUY+UvYcUBNaRKPo=; b=J k4/OAkkidVjj9gNzs/zVnD8eRAtD44euuZHc6FPhrh22g1C4qfVtLOiOglZCD/ph dkhRp/KJovqOc6GsYAegbWe1me/Vqnz6xSbtzahUmgxzK9uICUXqtVdEYr88i4JR lw3TgrnCLUuvVqrkySvnCAFJbhUQEBPiQ7M5KWqExP4gt18Cc6NBNWOO9Rvi/SYD gfe9teZ+kQNCA8zbd9AkILPzbEF9L8bERq0+5VIF1+F4mbDQAd5b2agYKj6NvIWX yYybAub00UswAwf8n6Tmj0psISplKSNCFweKgv+XYrdcDCQL0AaCQLGj0jevLTVi DU/ShvDZX+Do1dk+WfTxw== 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=1680819865; x= 1680906265; bh=WMyAC+JeTz0scrCYjJsiEe8BeyunUY+UvYcUBNaRKPo=; b=Z 6K0/DKKRUqt15stR7ebD1rb3uR6oWrwy3SNhav/fDqKNVuIl8DUV4d3yXyTLZsog xIBbDsc/iSIqvqE/cMQeLZnZQJ8VRtJtNTvQ8ymX/EF9AgugD5JEZJWQ04Xg5Jxj 4rbIFMck5e8PLagt+nWvZJcoOBa9xWF1xpGQkjgJxz9o4wxoYjHvVWLb1v1NTk28 1TIg6cWIY6+Oxqmx3EQSeuRjKUN1AXSA61oJPIKP5q15tT756MHY/E6ApbE1clAi dvJsQ+nveiZU1Jb1lPWj1um7C06tJAwvm8E4n0SZmXN5MoHcqCE9NfoBZA+c/QwQ Rq6Qr/sQjFdGHgrgmKwQw== 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:22 -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 14/18] NetworkPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:15 -0600 Message-Id: <20230406222319.2281263-15-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 NetworkPkg. 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 --- NetworkPkg/HttpDxe/HttpsSupport.c | 16 ++++++++-------- NetworkPkg/IScsiDxe/IScsiMisc.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NetworkPkg/HttpDxe/HttpsSupport.c b/NetworkPkg/HttpDxe/HttpsSupport.c index ad611e7c3836..7330be42c006 100644 --- a/NetworkPkg/HttpDxe/HttpsSupport.c +++ b/NetworkPkg/HttpDxe/HttpsSupport.c @@ -436,7 +436,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: truncated EFI_SIGNATURE_LIST header\n", - __FUNCTION__ + __func__ )); goto FreeCACert; } @@ -447,7 +447,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: SignatureListSize too small for EFI_SIGNATURE_LIST\n", - __FUNCTION__ + __func__ )); goto FreeCACert; } @@ -456,7 +456,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: truncated EFI_SIGNATURE_LIST body\n", - __FUNCTION__ + __func__ )); goto FreeCACert; } @@ -465,7 +465,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: only X509 certificates are supported\n", - __FUNCTION__ + __func__ )); Status = EFI_UNSUPPORTED; goto FreeCACert; @@ -475,7 +475,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: SignatureHeaderSize must be 0 for X509\n", - __FUNCTION__ + __func__ )); goto FreeCACert; } @@ -484,7 +484,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: SignatureSize too small for EFI_SIGNATURE_DATA\n", - __FUNCTION__ + __func__ )); goto FreeCACert; } @@ -495,7 +495,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: EFI_SIGNATURE_DATA array not a multiple of SignatureSize\n", - __FUNCTION__ + __func__ )); goto FreeCACert; } @@ -505,7 +505,7 @@ TlsConfigCertificate ( } if (CertCount == 0) { - DEBUG ((DEBUG_ERROR, "%a: no X509 certificates provided\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: no X509 certificates provided\n", __func__)); goto FreeCACert; } diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c index b3ea90158f51..78dc5c73d35a 100644 --- a/NetworkPkg/IScsiDxe/IScsiMisc.c +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c @@ -875,7 +875,7 @@ IScsiCreateAttempts ( DEBUG_ERROR, "%a: Failed to set 'InitialAttemptOrder' with Guid (%g): " "%r\n", - __FUNCTION__, + __func__, &gIScsiConfigGuid, Status )); @@ -926,7 +926,7 @@ IScsiCreateAttempts ( DEBUG_ERROR, "%a: Failed to set variable (mPrivate->PortString) with Guid (%g): " "%r\n", - __FUNCTION__, + __func__, &gEfiIScsiInitiatorNameProtocolGuid, Status )); -- 2.34.1