From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: devel@edk2.groups.io
Cc: Sean Brogan <sean.brogan@microsoft.com>,
Bret Barkelew <Bret.Barkelew@microsoft.com>
Subject: [Patch] UnitTestFrameworkPkg/UnitTestLib: Fix XCODE parenthesis issues
Date: Mon, 10 Feb 2020 10:43:32 -0800 [thread overview]
Message-ID: <20200210184332.30716-1-michael.d.kinney@intel.com> (raw)
https://bugzilla.tianocore.org/show_bug.cgi?id=2512
Remove extra sets of parenthesis that generate warnings on XCODE5
builds.
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
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
next reply other threads:[~2020-02-10 18:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-10 18:43 Michael D Kinney [this message]
2020-02-10 19:16 ` [edk2-devel] [Patch] UnitTestFrameworkPkg/UnitTestLib: Fix XCODE parenthesis issues Sean
2020-02-20 2:40 ` [EXTERNAL] " Bret Barkelew
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200210184332.30716-1-michael.d.kinney@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox