forked from osmocom/wireshark
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>
This commit is contained in:
parent
6d7b29592a
commit
c7d98e19b9
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue