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.171762.1680819876535274161 for ; Thu, 06 Apr 2023 15:24:36 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm3 header.b=bLIlsH8v; spf=pass (domain: bsdio.com, ip: 66.111.4.29, mailfrom: rebecca@bsdio.com) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D53B55C01BF; Thu, 6 Apr 2023 18:24:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 06 Apr 2023 18:24:35 -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=1680819875; x= 1680906275; bh=VKk1LQqPF1A4V4A2epxZMkHTOC9xxAAnmqrYUT4zQW8=; b=b LIlsH8vZz0eo9Fnr8S/YBYJfWy9oYXkG2pZdaEkQDsvGR5v5ySBfjtTw5LDY8Gs+ 3Qak7J8K+B9CVAaWjH+46nrxAwcJH1iiGsJ5M2rOG7mQFJZPukc7TmdjALc+IGYV SFx3spcOJUqSofhs+X5L/dtBgm2YLRSOYDM3PoU2puUe8tUjWBly/rfsu4G2Je16 727QXrlemIinMM6O0Sbcirh8xE/WdZ100t5zqQmDbBHp2oaiEsyyeRKJF55L84A+ XSGuGLtKd+fX6jhD23P5IJuzGmLaFoHxh7xLANSm96HhbbKUjot9X9a3yO7X9//g N8iWocHpBO9UejIOLR7zg== 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=1680819875; x= 1680906275; bh=VKk1LQqPF1A4V4A2epxZMkHTOC9xxAAnmqrYUT4zQW8=; b=W JuNgf4hPeaoaWbKatM8jQM++47GWgsxbYJjkhMpR/wSCiqYG3suyE+HEhK+Nyguj ispAj5vwO5KhNaZQVlVHaAhIyimoX4v2PgHmrH78VeaSGsrM7urK0L1gjZULGQwC EoKtVLozMFJLAY4gTxMUg/5ubNPR/oVeL7gymMgHdoDXO903+NEIeD8AodQA6LiS rlvLllB3ew2K7YzzdkLFFzmCceMttDabevqOyXnzXS7l8iwret7GdN0nAXI5VNlA KxnU5s/Lzj2WE8gSX4ulOA0EZna00MCrTTcJaFsXHmG8nJzCjp4b5yaIQWF72IvV 96BET+MYG9/rgblJpSAqA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdekucetufdoteggodetrfdotf 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:32 -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 17/18] UefiPayloadPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:18 -0600 Message-Id: <20230406222319.2281263-18-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 UefiPayloadPkg. 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 --- UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 4 ++-- UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c index 790e6109c03e..57274754141d 100644 --- a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c +++ b/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c @@ -135,7 +135,7 @@ InitRootBridge ( &mRootBridgeDevicePathTemplate ); if (DevicePath == NULL) { - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, EFI_OUT_OF_RESOURCES)); return EFI_OUT_OF_RESOURCES; } @@ -145,7 +145,7 @@ InitRootBridge ( DEBUG (( DEBUG_INFO, "%a: populated root bus %d, with room for %d subordinate bus(es)\n", - __FUNCTION__, + __func__, RootBusNumber, MaxSubBusNumber - RootBusNumber )); diff --git a/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c b/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c index c66e56aee15a..61a9f01ec9e7 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c +++ b/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c @@ -355,7 +355,7 @@ HandOffToDxeCore ( DEBUG (( DEBUG_INFO, "%a() Stack Base: 0x%lx, Stack Size: 0x%x\n", - __FUNCTION__, + __func__, BaseOfStack, STACK_SIZE )); -- 2.34.1