aboutsummaryrefslogtreecommitdiffstats
path: root/extcap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-04-11 13:13:09 -0700
committerGuy Harris <guy@alum.mit.edu>2015-04-11 20:13:44 +0000
commit3195a20eefa3c6601ce616bf870b846102a9350e (patch)
treee49c828cc936b696ee55dc294f3b49cedc16161d /extcap
parentee309553eb05e89f136d6c5eb6774ecc6a7ebf9a (diff)
Squelch 64-bit-to-32-bit shortening errors.
Cast some sizeofs, make a variable size_t. Change-Id: I439a9f2a584535597e6ac92ccdf243ae07e870b3 Reviewed-on: https://code.wireshark.org/review/8018 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'extcap')
-rw-r--r--extcap/androiddump.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/extcap/androiddump.c b/extcap/androiddump.c
index 5317c54a87..874f0e4167 100644
--- a/extcap/androiddump.c
+++ b/extcap/androiddump.c
@@ -296,8 +296,8 @@ static void extcap_dumper_dump(struct extcap_dumper extcap_dumper, char *buffer,
hdr.pseudo_header.bthci.sent = GINT32_FROM_BE(*direction) ? 0 : 1;
- hdr.len -= sizeof(own_pcap_bluetooth_h4_header);
- hdr.caplen -= sizeof(own_pcap_bluetooth_h4_header);
+ hdr.len -= (guint32)sizeof(own_pcap_bluetooth_h4_header);
+ hdr.caplen -= (guint32)sizeof(own_pcap_bluetooth_h4_header);
buffer += sizeof(own_pcap_bluetooth_h4_header);
hdr.pkt_encap = WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR;
@@ -1408,7 +1408,7 @@ static int capture_android_bluetooth_external_parser(char *interface,
case BLUEDROID_H4_PACKET_TYPE_HCI_CMD:
h4_header->direction = GINT32_TO_BE(BLUEDROID_DIRECTION_SENT);
- captured_length = sizeof(own_pcap_bluetooth_h4_header) + payload[3] + 4;
+ captured_length = (unsigned int)sizeof(own_pcap_bluetooth_h4_header) + payload[3] + 4;
length = sizeof(own_pcap_bluetooth_h4_header) + BLUEDROID_H4_SIZE + 2 + 1 + payload[3];
@@ -1416,7 +1416,7 @@ static int capture_android_bluetooth_external_parser(char *interface,
case BLUEDROID_H4_PACKET_TYPE_ACL:
h4_header->direction = (payload[2] & 0x80) ? GINT32_TO_BE(BLUEDROID_DIRECTION_RECV) : GINT32_TO_BE(BLUEDROID_DIRECTION_SENT);
- captured_length = sizeof(own_pcap_bluetooth_h4_header) + payload[3] + (payload[3 + 1] << 8) + 5;
+ captured_length = (unsigned int)sizeof(own_pcap_bluetooth_h4_header) + payload[3] + (payload[3 + 1] << 8) + 5;
length = sizeof(own_pcap_bluetooth_h4_header) + BLUEDROID_H4_SIZE + 2 + 2 + payload[3] + (payload[3 + 1] << 8);
@@ -1424,7 +1424,7 @@ static int capture_android_bluetooth_external_parser(char *interface,
case BLUEDROID_H4_PACKET_TYPE_SCO:
h4_header->direction = (payload[2] & 0x80) ? GINT32_TO_BE(BLUEDROID_DIRECTION_RECV) : GINT32_TO_BE(BLUEDROID_DIRECTION_SENT);
- captured_length = sizeof(own_pcap_bluetooth_h4_header) + payload[3] + 4;
+ captured_length = (unsigned int)sizeof(own_pcap_bluetooth_h4_header) + payload[3] + 4;
length = sizeof(own_pcap_bluetooth_h4_header) + BLUEDROID_H4_SIZE + 2 + 1 + payload[3];
@@ -1432,7 +1432,7 @@ static int capture_android_bluetooth_external_parser(char *interface,
case BLUEDROID_H4_PACKET_TYPE_HCI_EVT:
h4_header->direction = GINT32_TO_BE(BLUEDROID_DIRECTION_RECV);
- captured_length = sizeof(own_pcap_bluetooth_h4_header) + payload[2] + 3;
+ captured_length = (unsigned int)sizeof(own_pcap_bluetooth_h4_header) + payload[2] + 3;
length = sizeof(own_pcap_bluetooth_h4_header) + BLUEDROID_H4_SIZE + 1 + 1 + payload[2];
@@ -1597,7 +1597,7 @@ static int capture_android_logcat_text(char *interface, char *fifo,
ssize_t used_buffer_length = 0;
int sock;
const char *protocol_name;
- int exported_pdu_headers_size = 0;
+ size_t exported_pdu_headers_size = 0;
struct exported_pdu_header exported_pdu_header_protocol_normal;
struct exported_pdu_header *exported_pdu_header_protocol;
struct exported_pdu_header exported_pdu_header_end = {0, 0};