From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web09.2477.1581360215031095219 for ; Mon, 10 Feb 2020 10:43:35 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: michael.d.kinney@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2020 10:43:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,425,1574150400"; d="scan'208";a="380189427" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.254.12.129]) by orsmga004.jf.intel.com with ESMTP; 10 Feb 2020 10:43:34 -0800 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Sean Brogan , Bret Barkelew Subject: [Patch] UnitTestFrameworkPkg/UnitTestLib: Fix XCODE parenthesis issues Date: Mon, 10 Feb 2020 10:43:32 -0800 Message-Id: <20200210184332.30716-1-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit https://bugzilla.tianocore.org/show_bug.cgi?id=2512 Remove extra sets of parenthesis that generate warnings on XCODE5 builds. Cc: Sean Brogan Cc: Bret Barkelew Signed-off-by: Michael D Kinney --- UnitTestFrameworkPkg/Library/UnitTestLib/Assert.c | 6 +++--- UnitTestFrameworkPkg/Library/UnitTestLib/Log.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/Assert.c b/UnitTestFrameworkPkg/Library/UnitTestLib/Assert.c index dd85b84b08..c327ba88f1 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestLib/Assert.c +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/Assert.c @@ -247,7 +247,7 @@ UnitTestAssertEqual ( IN CONST CHAR8 *DescriptionB ) { - if ((ValueA != ValueB)) { + if (ValueA != ValueB) { UnitTestLogFailure ( FAILURETYPE_ASSERTEQUAL, "%a::%d Value %a != %a (%d != %d)!\n", @@ -365,7 +365,7 @@ UnitTestAssertNotEqual ( IN CONST CHAR8 *DescriptionB ) { - if ((ValueA == ValueB)) { + if (ValueA == ValueB) { UnitTestLogFailure ( FAILURETYPE_ASSERTNOTEQUAL, "%a::%d Value %a == %a (%d == %d)!\n", @@ -420,7 +420,7 @@ UnitTestAssertStatusEqual ( IN CONST CHAR8 *Description ) { - if ((Status != Expected)) { + if (Status != Expected) { UnitTestLogFailure ( FAILURETYPE_ASSERTSTATUSEQUAL, "%a::%d Status '%a' is %r, should be %r!\n", diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/Log.c b/UnitTestFrameworkPkg/Library/UnitTestLib/Log.c index 78df086a28..ac4e229b40 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestLib/Log.c +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/Log.c @@ -136,7 +136,7 @@ UnitTestLogInit ( return; } - if((Buffer != NULL) && (BufferSize > 0) && ((BufferSize <= UNIT_TEST_MAX_LOG_BUFFER))) { + if((Buffer != NULL) && (BufferSize > 0) && (BufferSize <= UNIT_TEST_MAX_LOG_BUFFER)) { CopyMem (Test->Log, Buffer, BufferSize); } } -- 2.21.0.windows.1