From nobody Sun Apr 28 19:39:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+70884+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70884+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=hpe.com ARC-Seal: i=1; a=rsa-sha256; t=1611896913; cv=none; d=zohomail.com; s=zohoarc; b=LJ134lR8zyKlDSy76+yPkiFsnjCzhULPrf3RciDQoy4QwrKQr6n8daJu93jVcw7pMZbY9TRUPMPbh5S/IkCVpYwHevTMDeCY/I8AKvjg3pyTeBgSLTawheXJucj24pyIrf+a8m9i1+VO0222itAltjS4/939lUBCB7U2F7gbHtc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611896913; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=kAcigOvd4FKimzMYdVvtGrck3mrdsLhKQV+6xKbdjAc=; b=bwJJNYwfTfyzuRaJRRXVq8j2Hrzn3FN3wS7V1Dl409t5B6rky/LsbSHiT/3gNLnBAbyjNL+FrStxgHH2cmqswKqYeoPOaXF72ZKm+0eR08jHxSkr+P5fQqvutWthPw+rljcvOFPbL20KDcS78EoUWfaUoTFi+TZUKr3YAkcFT6Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70884+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1611896912945621.0457230208806; Thu, 28 Jan 2021 21:08:32 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id i7b7YY1788612xNG6SiQAKyy; Thu, 28 Jan 2021 21:08:32 -0800 X-Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web11.5524.1611896911546851708 for ; Thu, 28 Jan 2021 21:08:31 -0800 X-Received: from pps.filterd (m0134422.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10T53utf024077; Fri, 29 Jan 2021 05:08:30 GMT X-Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 36b0x82edk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Jan 2021 05:08:30 +0000 X-Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id 6497C65; Fri, 29 Jan 2021 05:08:29 +0000 (UTC) X-Received: from abner-virtual-machine.asiapacific.hpqcorp.net (abner-virtual-machine.asiapacific.hpqcorp.net [15.119.210.153]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id 33AB14A; Fri, 29 Jan 2021 05:08:27 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: Leif Lindholm , Nickle Wang , Michael D Kinney Subject: [edk2-devel] [PATCH] RedfishPkg/JsonLib: Ignore the build error of assignment within conditional expression Date: Fri, 29 Jan 2021 12:19:42 +0800 Message-Id: <20210129041942.20583-1-abner.chang@hpe.com> MIME-Version: 1.0 X-HPE-SCL: -1 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0b-002e3701.pphosted.com id 10T53utf024077 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@hpe.com X-Gm-Message-State: Okr3AzQvok2X3kSUSCYwyNU4x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1611896912; bh=M7vQufX99Lj8xYsfEcBp/C5znXfh3ac6S78sMKNuvdA=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=CMKQETshFtn9aj1uCjl3qMMgAJf7xYI/EC5647FlhNKkljrQfAgAOqmiMgvtHQ13GRl M9e4CfAsMUUIOUZub3r7LcUv2PhnTpIvNnkUWV190Afcj3q+f8O5jnhV5bzQJQcmstz8m bE/1XFoqpfXrIHhi724WbQ7j+5BO1Uk6tbY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Add build option to ignore the build error of "assignment within conditional expression". This build error is caused by the macros defined in open source project jansson header file jansson.h. - json_object_foreach - json_object_foreach_safe - json_array_foreach We use build option to avoid the build errors on Visual Studio (GCC doesn't havvve this problem) for now. Already sent an email to jansson open source community to revise these macro as Leif's suggestion as below, for (key =3D json_object_iter_key(json_object_iter(object)); \ =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 key; = \ =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 key =3D json_object_iter_key(=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 \ =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 json_obj= ect_iter_next(object, json_object_key_to_iter(key)))) {=C2=A0\ =C2=A0 value =3D json_object_iter_value(json_object_key_to_iter(key));=C2=A0 =C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0\ if (!value) \ break;=C2=A0\ } \ We will remove this build option once the patch is accepted and upstreamed. Signed-off-by: Abner Chang Cc: Leif Lindholm Cc: Nickle Wang Cc: Michael D Kinney Reviewed-by: Liming Gao Reviewed-by: Nickle Wang --- RedfishPkg/Library/JsonLib/JsonLib.inf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RedfishPkg/Library/JsonLib/JsonLib.inf b/RedfishPkg/Library/Js= onLib/JsonLib.inf index 48b094a78a..9d52a622e1 100644 --- a/RedfishPkg/Library/JsonLib/JsonLib.inf +++ b/RedfishPkg/Library/JsonLib/JsonLib.inf @@ -75,12 +75,13 @@ # C4244: conversion from type1 to type2, possible loss of data # C4334: 32-bit shift implicitly converted to 64-bit # C4204: nonstandard extension used: non-constant aggregate initializer + # C4706: assignment within conditional expression # # Define macro HAVE_CONFIG_H to include jansson_private_config.h to buil= d. # Undefined _WIN32, WIN64, _MSC_VER macros # On GCC, no error on the unused-function and unused-but-set-variable. # - MSFT:*_*_X64_CC_FLAGS =3D /wd4204 /wd4244 /wd4090 /wd4334 /DHAVE_CONFIG_= H=3D1 /U_WIN32 /UWIN64 /U_MSC_VER - MSFT:*_*_IA32_CC_FLAGS =3D /wd4204 /wd4244 /wd4090 /DHAVE_CONFIG_H=3D1 /= U_WIN32 /UWIN64 /U_MSC_VER + MSFT:*_*_X64_CC_FLAGS =3D /wd4204 /wd4244 /wd4090 /wd4334 /wd4706 /DHAVE= _CONFIG_H=3D1 /U_WIN32 /UWIN64 /U_MSC_VER + MSFT:*_*_IA32_CC_FLAGS =3D /wd4204 /wd4244 /wd4090 /wd4706 /DHAVE_CONFIG= _H=3D1 /U_WIN32 /UWIN64 /U_MSC_VER GCC:*_*_*_CC_FLAGS =3D -Wno-unused-function -Wno-unused-but-set-variable =20 --=20 2.17.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 (#70884): https://edk2.groups.io/g/devel/message/70884 Mute This Topic: https://groups.io/mt/80203691/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-