summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-amqp.c
diff options
context:
space:
mode:
authorPetr Gotthard <petr.gotthard@honeywell.com>2015-10-05 08:24:46 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2015-10-05 09:06:24 +0000
commitc7d98e19b94d039801071f72e856297df8183c6e (patch)
tree6822c212153480a35ce2a7a5c5b63872558c8362 /epan/dissectors/packet-amqp.c
parent6d7b29592aa9cac3f10823ea8f33b18893707e83 (diff)
downloadwireshark-c7d98e19b94d039801071f72e856297df8183c6e.tar.gz
AMQP: Fix warnings and the OSX 10.5 x86 build
The AMQP channel number is 16-bit only. packet-amqp.c: In function 'dissect_amqp_0_9_method_channel_close': packet-amqp.c:8481: warning: cast to pointer from integer of different size packet-amqp.c: In function 'get_conversation_channel': packet-amqp.c:10512: warning: cast to pointer from integer of different size packet-amqp.c:10518: warning: cast to pointer from integer of different size Change-Id: I398ecfb19ecb7e741c2ed0675c1c625bf6a894f9 Reviewed-on: https://code.wireshark.org/review/10793 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-amqp.c')
-rw-r--r--epan/dissectors/packet-amqp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-amqp.c b/epan/dissectors/packet-amqp.c
index 9899787063..2038ce3ba4 100644
--- a/epan/dissectors/packet-amqp.c
+++ b/epan/dissectors/packet-amqp.c
@@ -8478,7 +8478,7 @@ dissect_amqp_0_9_method_channel_close(guint16 channel_num, tvbuff_t *tvb,
conv = find_or_create_conversation(pinfo);
conn = (amqp_conv *)conversation_get_proto_data(conv, proto_amqp);
- wmem_map_remove(conn->channels, GUINT_TO_POINTER(channel_num));
+ wmem_map_remove(conn->channels, GUINT_TO_POINTER((guint32)channel_num));
}
return offset;
@@ -10509,13 +10509,13 @@ get_conversation_channel(conversation_t *conv, guint16 channel_num)
/* the amqp_conv structure was already created to record the AMQP version */
conn = (amqp_conv *)conversation_get_proto_data(conv, proto_amqp);
- channel = (amqp_channel_t *)wmem_map_lookup(conn->channels, GUINT_TO_POINTER(channel_num));
+ channel = (amqp_channel_t *)wmem_map_lookup(conn->channels, GUINT_TO_POINTER((guint32)channel_num));
if(channel == NULL)
{
channel = wmem_new0(wmem_file_scope(), amqp_channel_t);
channel->conn = conn;
channel->channel_num = channel_num;
- wmem_map_insert(conn->channels, GUINT_TO_POINTER(channel_num), channel);
+ wmem_map_insert(conn->channels, GUINT_TO_POINTER((guint32)channel_num), channel);
}
return channel;