From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id A7CF07803CE for ; Mon, 1 Apr 2024 14:38:05 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=dbZZnf/o1wnObvnafrikVnN2Bc/xY4PwPVbAEzn7T3I=; c=relaxed/simple; d=groups.io; h=Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20240206; t=1711982284; v=1; b=y3vBA4yCDXpBsqoGaF7CPhBbvVyhnn9C5C+HVBayZjDFbiDcB+8Gn4eebv8PdC6+B9HXGFYb V42Ng2QhJ178T/g48NM7P8kcOABf7lLUvWFvG9YG9+pohIJxzEERRpYVgSTjOczy8CigzHgMrfk /QcZT/TB7Xv2f98HIAG53lsVtAedgLDHQ/b858kWGtqUm1UG8DZMIs9CvbYoDbhL/S0bcz8Lldz xmHV3Lty6ak3Iue1fvB2iWOB7OVSdrKIeyXOdctmhg4+IOeJyz2VW6T1CV3njZAmmdifr0zfMKM St4qOf42gaYqQpVVIOcW35rOXk8rYMs4TuahpQjW35X0A== X-Received: by 127.0.0.2 with SMTP id dFwlYY7687511xBGy5tyPolh; Mon, 01 Apr 2024 07:38:04 -0700 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.63]) by mx.groups.io with SMTP id smtpd.web10.39113.1711982283676073525 for ; Mon, 01 Apr 2024 07:38:03 -0700 X-Received: from BN9PR03CA0157.namprd03.prod.outlook.com (2603:10b6:408:f4::12) by SA3PR12MB7806.namprd12.prod.outlook.com (2603:10b6:806:31d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Mon, 1 Apr 2024 14:37:59 +0000 X-Received: from BN3PEPF0000B36D.namprd21.prod.outlook.com (2603:10b6:408:f4:cafe::7) by BN9PR03CA0157.outlook.office365.com (2603:10b6:408:f4::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.39 via Frontend Transport; Mon, 1 Apr 2024 14:37:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.118.232) by BN3PEPF0000B36D.mail.protection.outlook.com (10.167.243.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.0 via Frontend Transport; Mon, 1 Apr 2024 14:37:59 +0000 X-Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 1 Apr 2024 07:37:43 -0700 X-Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Mon, 1 Apr 2024 07:37:43 -0700 X-Received: from NV-CL38DL3.nvidia.com (10.127.8.9) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.1258.12 via Frontend Transport; Mon, 1 Apr 2024 07:37:42 -0700 From: "Nickle Wang via groups.io" To: CC: Abner Chang , Igor Kulchytskyy Subject: [edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg/Features: Variable used before being initialized Date: Mon, 1 Apr 2024 22:37:41 +0800 Message-ID: <20240401143741.51236-1-nicklew@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B36D:EE_|SA3PR12MB7806:EE_ X-MS-Office365-Filtering-Correlation-Id: 74b4643c-5bb1-495c-5055-08dc525953f1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: y5abzj2TZRWX4yigIyWZPc1E4r3WxBRLPLu6EP8HzQwFx8K1PiCPDISEMFkbi/+AHdZbLb/qKXXcurrjHW/jS+UJZWHkbBpigdppRv3qnU00M1988b/aIaCdWRmOYg4GYxSL97GZLlcxtzLaT+93513HHZuejD99qGUrTMgQF2pRkZpawdzHfVL31Ncz2rTG7Ng+MBf3TURu8U3bpRiahoqPpzZ36hnr3D5KeKwukW8btDMrEZqBotTQ01ZoqApwCrVjLGb+jjRTXbpqBfgL9iJNX4kDLTvIL3G5aoDexcZVfddvJcHKmqnW7hzEtexh1On0yMD8AsoGA7J5ZPFZMajMwLXajL8/3FFFEbSO/x849U4YuQqKhNcKhADDedcdvoBi/V8X217wPcEiZeoJZRwzvSuabCYDW2CsWN7AHZfFuYmUn1RWmVyTP+M9XrD5i9Mch8T+Yuu6LmlqN2zkcAN2C0DVgMBDv5DJCnXUcKKjjsN8IzQm5kOWVFQ9o52rFASdAdUlSZtsJF6VBTYZBk7rznoLM/ySsaLNlcL1B+Gzzp/DoUVLjV/Fy6W7zrqzT+QBT0XhnJWYyOCqAce5VylIevNFpb2IFFlPAjK9UQaSXVBvclH6RpfDS6hAQyjCSPfYQd4zoQUX/Calo58Mxsj8eHM9yBPlpNUZBC6On5ZJmvHEtdpXLAsJq2yFTMsB1XSsQLSVE1UK6LtgRZxM7q5CcjwQvqXTGEtKPyt9vEG4AQRz5ZXHMg6Fi17xngjx X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2024 14:37:59.1783 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 74b4643c-5bb1-495c-5055-08dc525953f1 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN3PEPF0000B36D.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB7806 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Mon, 01 Apr 2024 07:38:03 -0700 Reply-To: devel@edk2.groups.io,nicklew@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: cxgBHeB1xL6qqaNMB70lp2VJx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=y3vBA4yC; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Private->Uri is initialized after calling SetRedfishSettingsObjectsUri() but it is used in SetRedfishSettingsObjectsUri function. Use input parameter "Uri" instead. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c | 2 +- RedfishClientPkg/Features/BootOption/v1_0_4/Dxe/BootOptionDxe.c | 2 +- .../Features/ComputerSystem/v1_13_0/Dxe/ComputerSystemDxe.c | 2 +- .../Features/ComputerSystem/v1_5_0/Dxe/ComputerSystemDxe.c | 2 +- RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c b/RedfishC= lientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c index bb64ef862..ed7823a59 100644 --- a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c +++ b/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c @@ -141,7 +141,7 @@ RedfishResourceConsumeResource ( ); if (!EFI_ERROR (Status)) { DEBUG ((REDFISH_DEBUG_TRACE, "%a: @Redfish.Settings found: %s\n", __fu= nc__, PendingSettingUri)); - SetRedfishSettingsObjectsUri (Private->Uri, PendingSettingUri); + SetRedfishSettingsObjectsUri (Uri, PendingSettingUri); Private->Uri =3D PendingSettingUri; ExpectedResponse =3D &PendingSettingResponse; } else { diff --git a/RedfishClientPkg/Features/BootOption/v1_0_4/Dxe/BootOptionDxe.= c b/RedfishClientPkg/Features/BootOption/v1_0_4/Dxe/BootOptionDxe.c index 5a66fe59e..fec3a0090 100644 --- a/RedfishClientPkg/Features/BootOption/v1_0_4/Dxe/BootOptionDxe.c +++ b/RedfishClientPkg/Features/BootOption/v1_0_4/Dxe/BootOptionDxe.c @@ -130,7 +130,7 @@ RedfishResourceConsumeResource ( ); if (!EFI_ERROR (Status)) { DEBUG ((REDFISH_BOOT_OPTION_DEBUG_TRACE, "%a: @Redfish.Settings found:= %s\n", __func__, PendingSettingUri)); - SetRedfishSettingsObjectsUri (Private->Uri, PendingSettingUri); + SetRedfishSettingsObjectsUri (Uri, PendingSettingUri); Private->Uri =3D PendingSettingUri; ExpectedResponse =3D &PendingSettingResponse; } else { diff --git a/RedfishClientPkg/Features/ComputerSystem/v1_13_0/Dxe/ComputerS= ystemDxe.c b/RedfishClientPkg/Features/ComputerSystem/v1_13_0/Dxe/ComputerS= ystemDxe.c index a0c71212b..d829a22d2 100644 --- a/RedfishClientPkg/Features/ComputerSystem/v1_13_0/Dxe/ComputerSystemDx= e.c +++ b/RedfishClientPkg/Features/ComputerSystem/v1_13_0/Dxe/ComputerSystemDx= e.c @@ -133,7 +133,7 @@ RedfishResourceConsumeResource ( ); if (!EFI_ERROR (Status)) { DEBUG ((REDFISH_DEBUG_TRACE, "%a: @Redfish.Settings found: %s\n", __fu= nc__, PendingSettingUri)); - SetRedfishSettingsObjectsUri (Private->Uri, PendingSettingUri); + SetRedfishSettingsObjectsUri (Uri, PendingSettingUri); Private->Uri =3D PendingSettingUri; ExpectedResponse =3D &PendingSettingResponse; } else { diff --git a/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Dxe/ComputerSy= stemDxe.c b/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Dxe/ComputerSys= temDxe.c index 494bf59df..de1691534 100644 --- a/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Dxe/ComputerSystemDxe= .c +++ b/RedfishClientPkg/Features/ComputerSystem/v1_5_0/Dxe/ComputerSystemDxe= .c @@ -134,7 +134,7 @@ RedfishResourceConsumeResource ( ); if (!EFI_ERROR (Status)) { DEBUG ((REDFISH_DEBUG_TRACE, "%a: @Redfish.Settings found: %s\n", __fu= nc__, PendingSettingUri)); - SetRedfishSettingsObjectsUri (Private->Uri, PendingSettingUri); + SetRedfishSettingsObjectsUri (Uri, PendingSettingUri); Private->Uri =3D PendingSettingUri; ExpectedResponse =3D &PendingSettingResponse; } else { diff --git a/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c b/Redf= ishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c index f2c0a7735..413b90c97 100644 --- a/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c +++ b/RedfishClientPkg/Features/Memory/V1_7_1/Dxe/MemoryDxe.c @@ -134,7 +134,7 @@ RedfishResourceConsumeResource ( ); if (!EFI_ERROR (Status)) { DEBUG ((REDFISH_DEBUG_TRACE, "%a: @Redfish.Settings found: %s\n", __fu= nc__, PendingSettingUri)); - SetRedfishSettingsObjectsUri (Private->Uri, PendingSettingUri); + SetRedfishSettingsObjectsUri (Uri, PendingSettingUri); Private->Uri =3D PendingSettingUri; ExpectedResponse =3D &PendingSettingResponse; } else { --=20 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117295): https://edk2.groups.io/g/devel/message/117295 Mute This Topic: https://groups.io/mt/105265503/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-