* [PATCH 1/3] RedfishPkg/JsonLib: address coverity issue
@ 2023-03-28 5:59 Nickle Wang
2023-03-29 1:38 ` Chang, Abner
0 siblings, 1 reply; 2+ messages in thread
From: Nickle Wang @ 2023-03-28 5:59 UTC (permalink / raw)
To: devel; +Cc: Abner Chang, Igor Kulchytskyy, Nick Ramirez
Fix implicit conversion issue in JsonLib.
Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
---
RedfishPkg/Library/JsonLib/JsonLib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/RedfishPkg/Library/JsonLib/JsonLib.c b/RedfishPkg/Library/JsonLib/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.<BR>
(C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
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);
}
--
2.40.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] RedfishPkg/JsonLib: address coverity issue
2023-03-28 5:59 [PATCH 1/3] RedfishPkg/JsonLib: address coverity issue Nickle Wang
@ 2023-03-29 1:38 ` Chang, Abner
0 siblings, 0 replies; 2+ messages in thread
From: Chang, Abner @ 2023-03-29 1:38 UTC (permalink / raw)
To: Nickle Wang, devel@edk2.groups.io; +Cc: Igor Kulchytskyy, Nick Ramirez
[AMD Official Use Only - General]
Reviewed-by: Abner Chang <abner.chang@amd.com>
> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Tuesday, March 28, 2023 1:59 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>; Nick Ramirez <nramirez@nvidia.com>
> Subject: [PATCH 1/3] RedfishPkg/JsonLib: address coverity issue
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> Fix implicit conversion issue in JsonLib.
>
> Signed-off-by: Nickle Wang <nicklew@nvidia.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Cc: Nick Ramirez <nramirez@nvidia.com>
> ---
> RedfishPkg/Library/JsonLib/JsonLib.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/RedfishPkg/Library/JsonLib/JsonLib.c
> b/RedfishPkg/Library/JsonLib/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.<BR>
> (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
> Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
> + Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
>
> 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);
> }
> --
> 2.40.0.windows.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-29 1:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-28 5:59 [PATCH 1/3] RedfishPkg/JsonLib: address coverity issue Nickle Wang
2023-03-29 1:38 ` Chang, Abner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox