From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web10.27952.1612144513432424800 for ; Sun, 31 Jan 2021 17:55:14 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Mon, 01 Feb 2021 09:55:03 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: "'Leif Lindholm'" , "'Nickle Wang'" , "'Michael D Kinney'" References: <20210129041942.20583-1-abner.chang@hpe.com> In-Reply-To: <20210129041942.20583-1-abner.chang@hpe.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIXSBSZWRmaXNoUGtnL0pzb25MaWI6IElnbm9yZSB0aGUgYnVpbGQgZXJyb3Igb2YgYXNzaWdubWVudCB3aXRoaW4gY29uZGl0aW9uYWwgZXhwcmVzc2lvbg==?= Date: Mon, 1 Feb 2021 09:55:08 +0800 Message-ID: <000401d6f83d$4533e250$cf9ba6f0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIbcAa6MsIy+vbXspjMII3DHbyHcqm5mnpg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Reviewed-by: Liming Gao > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+70884+4905953+8761045@groups.i= o > =E4=BB=A3=E8=A1=A8 Abner = Chang > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2021=E5=B9=B41=E6=9C=8829=E6=97=A5= 12:20 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > =E6=8A=84=E9=80=81: Leif Lindholm ; Nickle Wang > ; Michael D Kinney > =E4=B8=BB=E9=A2=98: [edk2-devel] [PATCH] RedfishPkg/JsonLib: Ignore the = build error of > assignment within conditional expression >=20 > 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. >=20 > - json_object_foreach > - json_object_foreach_safe > - json_array_foreach >=20 > 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, >=20 > for (key =3D json_object_iter_key(json_object_iter(object)); \ > key; > \ > key =3D > json_object_iter_key( \ > json_object_iter_next(object, > json_object_key_to_iter(key)))) { \ > value =3D > json_object_iter_value(json_object_key_to_iter(key)); \ > if (!value) \ > break; \ > } \ >=20 > We will remove this build option once the patch is accepted and > upstreamed. >=20 > Signed-off-by: Abner Chang >=20 > Cc: Leif Lindholm > Cc: Nickle Wang > Cc: Michael D Kinney > --- > RedfishPkg/Library/JsonLib/JsonLib.inf | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/RedfishPkg/Library/JsonLib/JsonLib.inf > b/RedfishPkg/Library/JsonLib/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 > build. > # 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 > -- > 2.17.1 >=20 >=20 >=20 >=20 >=20