From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (NAM04-DM6-obe.outbound.protection.outlook.com [40.107.102.51]) by mx.groups.io with SMTP id smtpd.web11.17870.1680070433354901692 for ; Tue, 28 Mar 2023 23:13:53 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nvidia.com header.s=selector2 header.b=hm9TKNVI; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.102.51, mailfrom: nicklew@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lVskrYolex57ex9u9EshSemXHd/zrhUvTAg1fYvxwIdhEuYt4sgORLmHCwyT4jIxrwcAeWOlJ96ZDdWw3MA6k4OP1MKEIVFmb8wV/4Uwo/X9rVf7TQ15Fk7fMz+rESquOwPkQfKBdvraneJYmdqGlQyrT1gX+puA+u/IHS1ZJ+yvJkURzk84p2Z7nd2VlEGX7oahP4KAqv75yK9kTaWAd0kaQMUS8iYok8JRZMB2qBk+3ujlUYonMoWaUzsIYKS8gIADX8rsAqWKwiEVR6fhNT9vfh4LMSGGMl06LFAh2pwv0TTidLSBLnoAhaEbhzCJQ1Mxd8qcQhBv5Uk8HoXlwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9MSY8uvpXloAU0ywb8X5JtFk9H9+8laar7MUODBJg+s=; b=g0Z7Gb6ErGjTO7y8zpoW1Q15O/coSKIL9NYK8q3OcfXsiyW4kxOCpX5dCXx8g2l+y2+6yBxtKU1rofm/OJRAqWii3VNU1z53L82iDk8Yp1O1CmtDIGsW1ebhSfx39nLWdaV89i929D/eLkWzpwKgHMKXzh6qJmDUaSm7lSMvnVu/hB7LKPCqIjNaE9z6so9dyhFJHoA44XK2Waud3J39LcnHM1/hSeKtwP8fBJaAou8xOIe/XRu5t5pnEJuPM/eSJN3DCCcxhhf2VMdTlpi5KYD1z1Y/ynbL66DRPxVk1t72PNZfCcesH6pEgSiaUTObTVtDZHqSBQOU3UwaUVRVWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9MSY8uvpXloAU0ywb8X5JtFk9H9+8laar7MUODBJg+s=; b=hm9TKNVIMFRjCm0z0Y9AXdiQ8v1P9v++rdDiXLsUgeuDgSmBAER6J85+qZvpFrA/RIxFxhoQ+tTeedIcavF4sfT6nlHfWTPeL7fqpTOmH5MyHRiA873RTvJsDnviYeMMUqzp25RvZX5XT92U0vkRR+2U33WPcbWqvsvdC6/B2S3T43b+m8tXz0jc2DJcX37Dd0ggHszmO3iKelqCpZ/xBvxL5CGL+XuzZQQN8F5rQ+86XwZink7bmxCgtkRVDMyDv+UkxRzCHkqkdzNw/G1FBISe8xJaVWwy+OtgYPY5FOCRG0lLocAg27wOZjDuET0GeJrfiS+yZcN5TSq9PQHOcQ== Received: from DM6PR17CA0030.namprd17.prod.outlook.com (2603:10b6:5:1b3::43) by PH8PR12MB6937.namprd12.prod.outlook.com (2603:10b6:510:1bc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.41; Wed, 29 Mar 2023 06:13:51 +0000 Received: from DS1PEPF0000E642.namprd02.prod.outlook.com (2603:10b6:5:1b3:cafe::65) by DM6PR17CA0030.outlook.office365.com (2603:10b6:5:1b3::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.20 via Frontend Transport; Wed, 29 Mar 2023 06:13:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS1PEPF0000E642.mail.protection.outlook.com (10.167.17.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.30 via Frontend Transport; Wed, 29 Mar 2023 06:13:50 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Tue, 28 Mar 2023 23:13:41 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Tue, 28 Mar 2023 23:13:40 -0700 Received: from NV-CL38DL3.nvidia.com (10.127.8.11) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.5 via Frontend Transport; Tue, 28 Mar 2023 23:13:39 -0700 From: "Nickle Wang" To: CC: Abner Chang , Igor Kulchytskyy , "Nick Ramirez" Subject: [PATCH v2 1/3] RedfishPkg/JsonLib: address coverity issue Date: Wed, 29 Mar 2023 14:13:40 +0800 Message-ID: <20230329061340.265-1-nicklew@nvidia.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Return-Path: nicklew@nvidia.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000E642:EE_|PH8PR12MB6937:EE_ X-MS-Office365-Filtering-Correlation-Id: a5b31c64-ac3b-4320-1d86-08db301cc3f5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fEcXMkAj3Ej/1G/xKdMEAqQo/CEO/Wvl62wfa00oTiBsVKw3ztrgBGxnaJbDRhFXC+Bip6IDjZSvRWSeXzRpAXoh9/CASzwAnDUs8+xvJGprPqTA/cKvmMqzV03+g6nxIZ/SkYuk3fFP6ZVEdHqvd/RDiM4CSQIm1wfwzXleJBdoMmCrP3Is8IeB8oGQTbVRXddMw0HhYFS+Bbk/dpTKkoJ4EIJu3kZrdtMIZ10TQ7YN6MoCajpJovyEcFnP/IoiXb25MVNCbG2UxVlenxQVG4PNjW2kq1p+hjDOQesoX8FT7aPw2GKzP13uoRjCEdpKK1FSh5ixwoAoNizUGEvwQPAOiyO+KoPe2LanhyDP4Xngd/EXfHuOFlHIadFs3cExgyVnfLLYOz89OfC5CiXZSXMaefl2NBHhw+Y9INPI3LLzKGMqVX4mFp7Eb6vD5kyLM4uWs757LFkE5mf0mAc+eAy/afXoWMMLem84VMh3u/fMOwsEb1RsjvDdMgckyC77xfK04SvG0eJZfopropWIWeF/AKzwrsTVFA9nvmtUvFTmAytqhnFmbqw7FX2UXLh8cRvlyaXEymbvt+e2LbJyqB2RPsIUHliPF9TsYD70BXZkJ1l4Hz2P4yk7ifHFjcNNyfgg2aXXNwNNMhFL/lyIY0LgR+d2WTGWQrPFV293KLYQ5D7bXZu+TmFknaLmfUIXKEnZESfkKRalq/jc1UVCl2wTw8d0RuJkfePbDhoh5fA3TTIV9rV6BPWKQ7w7K+ms X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(346002)(136003)(39860400002)(376002)(396003)(451199021)(40470700004)(46966006)(36840700001)(47076005)(86362001)(6916009)(426003)(83380400001)(82310400005)(26005)(2906002)(107886003)(1076003)(6666004)(316002)(7696005)(54906003)(478600001)(40480700001)(5660300002)(356005)(8676002)(186003)(40460700003)(4326008)(2616005)(36860700001)(336012)(36756003)(8936002)(7636003)(70586007)(82740400003)(70206006)(41300700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2023 06:13:50.6333 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a5b31c64-ac3b-4320-1d86-08db301cc3f5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000E642.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6937 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Fix implicit conversion issue in JsonLib. Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy Cc: Nick Ramirez Reviewed-by: Abner Chang --- RedfishPkg/Library/JsonLib/JsonLib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RedfishPkg/Library/JsonLib/JsonLib.c b/RedfishPkg/Library/Json= Lib/JsonLib.c index 5d75882004..69f2455c00 100644 --- a/RedfishPkg/Library/JsonLib/JsonLib.c +++ b/RedfishPkg/Library/JsonLib/JsonLib.c @@ -7,6 +7,7 @@ Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.
(C) Copyright 2021 Hewlett Packard Enterprise Development LP
Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. =20 SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -1112,5 +1113,5 @@ JsonGetType ( IN EDKII_JSON_VALUE JsonValue ) { - return ((json_t *)JsonValue)->type; + return (EDKII_JSON_TYPE)(((json_t *)JsonValue)->type); } --=20 2.40.0.windows.1