public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] UnitTestFrameworkPkg/UnitTestLib: Fix XCODE parenthesis issues
@ 2020-02-10 18:43 Michael D Kinney
  2020-02-10 19:16 ` [edk2-devel] " Sean
  2020-02-20  2:40 ` [EXTERNAL] " Bret Barkelew
  0 siblings, 2 replies; 3+ messages in thread
From: Michael D Kinney @ 2020-02-10 18:43 UTC (permalink / raw)
  To: devel; +Cc: Sean Brogan, Bret Barkelew

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [Patch] UnitTestFrameworkPkg/UnitTestLib: Fix XCODE parenthesis issues
  2020-02-10 18:43 [Patch] UnitTestFrameworkPkg/UnitTestLib: Fix XCODE parenthesis issues Michael D Kinney
@ 2020-02-10 19:16 ` Sean
  2020-02-20  2:40 ` [EXTERNAL] " Bret Barkelew
  1 sibling, 0 replies; 3+ messages in thread
From: Sean @ 2020-02-10 19:16 UTC (permalink / raw)
  To: Michael D Kinney, devel

[-- Attachment #1: Type: text/plain, Size: 54 bytes --]

Reviewed by: Sean Brogan <sean.brogan@microsoft.com>

[-- Attachment #2: Type: text/html, Size: 60 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [EXTERNAL] [Patch] UnitTestFrameworkPkg/UnitTestLib: Fix XCODE parenthesis issues
  2020-02-10 18:43 [Patch] UnitTestFrameworkPkg/UnitTestLib: Fix XCODE parenthesis issues Michael D Kinney
  2020-02-10 19:16 ` [edk2-devel] " Sean
@ 2020-02-20  2:40 ` Bret Barkelew
  1 sibling, 0 replies; 3+ messages in thread
From: Bret Barkelew @ 2020-02-20  2:40 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io; +Cc: Sean Brogan

[-- Attachment #1: Type: text/plain, Size: 2823 bytes --]

Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com>

- Bret

________________________________
From: Michael D Kinney <michael.d.kinney@intel.com>
Sent: Monday, February 10, 2020 10:43:32 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>
Subject: [EXTERNAL] [Patch] UnitTestFrameworkPkg/UnitTestLib: Fix XCODE parenthesis issues

https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2512&amp;data=02%7C01%7CBret.Barkelew%40microsoft.com%7C27b6bd3a84b64d456eec08d7ae5922fa%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637169570173423344&amp;sdata=%2BfnZ0QzM%2Fu1zVdS69ZUyxIkngUjdvpZo8I93SKLqeh8%3D&amp;reserved=0

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


[-- Attachment #2: Type: text/html, Size: 5593 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-20  2:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-10 18:43 [Patch] UnitTestFrameworkPkg/UnitTestLib: Fix XCODE parenthesis issues Michael D Kinney
2020-02-10 19:16 ` [edk2-devel] " Sean
2020-02-20  2:40 ` [EXTERNAL] " Bret Barkelew

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox