diff options
author | Amitay Isaacs <amitay@gmail.com> | 2014-05-28 10:40:29 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2014-05-29 03:35:54 +0200 |
commit | f2ef23cd5f227d2da2f032a2a56fbdd4d105b137 (patch) | |
tree | 6efd6db65ef8c69c1bca4161bc526ed906ae6f38 /ctdb/ib/ibwrapper_test.c | |
parent | a27e59e8ecb622de826323c048107ab75acd0928 (diff) | |
download | samba-f2ef23cd5f227d2da2f032a2a56fbdd4d105b137.tar.gz samba-f2ef23cd5f227d2da2f032a2a56fbdd4d105b137.tar.xz samba-f2ef23cd5f227d2da2f032a2a56fbdd4d105b137.zip |
ctdb-ib: Make infiniband transport compile again
Update included header files and fix compilation warnings.
ib/ibwrapper.c: In function ‘ibw_stop’:
ib/ibwrapper.c:1015:17: warning: comparison between ‘enum ibw_state_ctx’ and ‘enum ibw_state_conn’ [-Wenum-compare]
if (ctx->state==IBWC_ERROR || ctx->state==IBWC_CONNECTED) {
^
ib/ibwrapper.c:1015:43: warning: comparison between ‘enum ibw_state_ctx’ and ‘enum ibw_state_conn’ [-Wenum-compare]
if (ctx->state==IBWC_ERROR || ctx->state==IBWC_CONNECTED) {
The current logic just seems wrong. The context of this line and the
error checking in ibw_disconnect() suggest that these comparisons
should use p->state rather than ctx->state, so do that.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/ib/ibwrapper_test.c')
-rw-r--r-- | ctdb/ib/ibwrapper_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/ib/ibwrapper_test.c b/ctdb/ib/ibwrapper_test.c index ba54286ace..48162c328a 100644 --- a/ctdb/ib/ibwrapper_test.c +++ b/ctdb/ib/ibwrapper_test.c @@ -325,7 +325,7 @@ int ibwtest_receive_handler(struct ibw_conn *conn, void *buf, int n) n - sizeof(uint32_t) - 2); DEBUG(DEBUG_DEBUG, ("[%d]msg varsize %u/sum %u from %s\n", op, - n - sizeof(uint32_t) - 2, + (uint32_t)(n - sizeof(uint32_t) - 2), (uint32_t)sum, tconn->id ? tconn->id : "NULL")); if (sum!=((unsigned char *)buf)[n-1]) { |