summaryrefslogtreecommitdiff
path: root/MdePkg/Library
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2014-08-16 16:18:59 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2014-08-16 16:18:59 +0000
commit6a650d1fd124b5b22787f2bde2c102e9f5e8e404 (patch)
tree9e1b5f5b18790e26e8cbdcee91b969c29a6242fa /MdePkg/Library
parent75955444cb6a5d9a5e85775ec2e9a36aedec61c8 (diff)
downloadedk2-platforms-6a650d1fd124b5b22787f2bde2c102e9f5e8e404.tar.xz
MdePkg: BaseOrderedCollectionRedBlackTreeLib: silence invalid VS2005 warnings
VS2005 reports the following build failure: BaseOrderedCollectionRedBlackTreeLib.c(151) : warning C4244: 'return' : conversion from 'int' to 'BOOLEAN', possible loss of data BaseOrderedCollectionRedBlackTreeLib.c(840) : warning C4244: 'return' : conversion from 'int' to 'BOOLEAN', possible loss of data This is incorrect. The ISO C standard guarantees that the expressions in question can only return values 0 and 1, both of which can be represented by BOOLEAN (== UINT8, == unsigned char). Silence the incorrect warnings with explicit casts to BOOLEAN. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15813 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library')
-rw-r--r--MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.c b/MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.c
index 9f40b70ff5..b37caf239a 100644
--- a/MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.c
+++ b/MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.c
@@ -148,7 +148,7 @@ OrderedCollectionIsEmpty (
IN CONST RED_BLACK_TREE *Tree
)
{
- return Tree->Root == NULL;
+ return (BOOLEAN)(Tree->Root == NULL);
}
@@ -838,7 +838,7 @@ NodeIsNullOrBlack (
IN CONST RED_BLACK_TREE_NODE *Node
)
{
- return Node == NULL || Node->Color == RedBlackTreeBlack;
+ return (BOOLEAN)(Node == NULL || Node->Color == RedBlackTreeBlack);
}