On OS X, gcc can complain that 'child' is uninitialized whenever this
'else if' condition is false. We already handled the case where both
node->right and node->left are non-NULL earlier in this function, so
this should never occur. So, to get rid of the warning, just always
take the path in the 'else if', and assert that the right child is
NULL.
Change-Id: I3575de84ea172d3c7e0e022809fdcd0e3b4dcc27
Reviewed-on: http://gerrit.openafs.org/10687
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
#else
# include <roken.h>
#endif
+#include <afs/opr.h>
#include "rbtree.h"
if (node->left == NULL)
child = node->right;
- else if (node->right == NULL)
+ else {
+ opr_Assert(node->right == NULL);
child = node->left;
+ }
child->parent = node->parent;