From 560b90ba75f86f8220a0d5e0a88f655860702bbf Mon Sep 17 00:00:00 2001 From: Graham Bloice Date: Fri, 11 Jul 2014 22:30:25 +0100 Subject: Fix the x64 builds after the commit:b3b1f7c3aa2233a147294bad833b748d38fba84d From Change: 2803 Reviewed-on: https://code.wireshark.org/review/3014 Reviewed-by: Graham Bloice (cherry picked from commit 804409747357071631867ccbabc16a5575f5f364) Change-Id: Ib8bad631f2544f5ffc1aa50b274223ef4d6876d3 Reviewed-on: https://code.wireshark.org/review/8348 Reviewed-by: Gerald Combs --- wiretap/logcat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wiretap/logcat.c b/wiretap/logcat.c index 6c2a38262d..0bc1e287a3 100644 --- a/wiretap/logcat.c +++ b/wiretap/logcat.c @@ -215,7 +215,7 @@ static gint detect_version(wtap *wth, int *err, gchar **err_info) /* if msg is '\0'-terminated, is it equal to the payload len? */ ++msg_part; - msg_len = payload_length - (msg_part - msg_payload); + msg_len = (guint16)(payload_length - (msg_part - msg_payload)); msg_end = (guint8 *) memchr(msg_part, '\0', msg_len); /* is the end of the buffer (-1) equal to the end of msg? */ if (msg_end && (msg_payload + payload_length - 1 != msg_end)) @@ -249,9 +249,9 @@ static gboolean logcat_read_packet(struct logcat_phdr *logcat, FILE_T fh, payload_length = pletoh16(tmp); if (logcat->version == 1) { - packet_size = sizeof(struct logger_entry) + payload_length; + packet_size = (gint)sizeof(struct logger_entry) + payload_length; } else if (logcat->version == 2) { - packet_size = sizeof(struct logger_entry_v2) + payload_length; + packet_size = (gint)sizeof(struct logger_entry_v2) + payload_length; } else { return FALSE; } -- cgit v1.2.3