From 4c84822d974fe4f7b5e6f7bd1c3940e472646d20 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 29 Oct 2009 12:00:11 +0100 Subject: [PATCH] [CLEANUP] ebtree: cast to char * to get rid of gcc warning Gcc warns about potential signedness issues when using strcmp(). --- ebtree/ebsttree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ebtree/ebsttree.h b/ebtree/ebsttree.h index fb34ea9a41..63ee4f5cbd 100644 --- a/ebtree/ebsttree.h +++ b/ebtree/ebsttree.h @@ -48,7 +48,7 @@ static forceinline struct ebmb_node *__ebst_lookup(struct eb_root *root, const v if ((eb_gettag(troot) == EB_LEAF)) { node = container_of(eb_untag(troot, EB_LEAF), struct ebmb_node, node.branches); - if (strcmp(node->key, x) == 0) + if (strcmp((char *)node->key, x) == 0) return node; else return NULL; @@ -61,7 +61,7 @@ static forceinline struct ebmb_node *__ebst_lookup(struct eb_root *root, const v * value, and we walk down left, or it's a different * one and we don't have our key. */ - if (strcmp(node->key, x) != 0) + if (strcmp((char *)node->key, x) != 0) return NULL; troot = node->node.branches.b[EB_LEFT];