aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-03-19 19:32:28 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-03-19 18:34:29 +0000
commit5b7ad8278ac70ffb26ca12960dfe45ba4cab8368 (patch)
treeac74543214ae09aadaf91c991754ce0f9d085d69 /wiretap
parent16e7096df33a6aca7e2417f8c44ff0477421b521 (diff)
Try to fix Buildbot (Mac OS X and Windows) about conversion
logcat.c: In function 'detect_version': logcat.c:142: warning: implicit conversion shortens 64-bit value into a 32-bit value logcat.c:143: warning: implicit conversion shortens 64-bit value into a 32-bit value logcat.c:150: warning: implicit conversion shortens 64-bit value into a 32-bit value logcat.c:151: warning: implicit conversion shortens 64-bit value into a 32-bit value logcat.c: In function 'logcat_dump_text': logcat.c:427: warning: implicit conversion shortens 64-bit value into a 32-bit value logcat.c:451: warning: implicit conversion shortens 64-bit value into a 32-bit value Change-Id: I4361567e599b7d04f422fccd7f8b1bccc897f114 Reviewed-on: https://code.wireshark.org/review/744 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/logcat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/wiretap/logcat.c b/wiretap/logcat.c
index 2cf5107120..5d661ac3e1 100644
--- a/wiretap/logcat.c
+++ b/wiretap/logcat.c
@@ -139,16 +139,16 @@ static gint detect_version(wtap *wth, int *err, gchar **err_info)
}
if (try_header_size == 24) {
- tag_length = strlen(buffer + 5 * 4 + 1) + 1;
- log_length = strlen(buffer + 5 * 4 + 1 + tag_length) + 1;
+ tag_length = (guint32)strlen(buffer + 5 * 4 + 1) + 1;
+ log_length = (guint32)strlen(buffer + 5 * 4 + 1 + tag_length) + 1;
if (payload_length == 1 + tag_length + log_length) {
g_free(buffer);
return 2;
}
}
- tag_length = strlen(buffer + 4 * 4 + 1) + 1;
- log_length = strlen(buffer + 4 * 4 + 1 + tag_length) + 1;
+ tag_length = (guint32)strlen(buffer + 4 * 4 + 1) + 1;
+ log_length = (guint32)strlen(buffer + 4 * 4 + 1 + tag_length) + 1;
if (payload_length == 1 + tag_length + log_length) {
if (file_seek(wth->fh, file_offset + 4 * 4 + 1 + tag_length + log_length, SEEK_SET, err) == -1) {
g_free(buffer);
@@ -424,7 +424,7 @@ static gboolean logcat_dump_text(wtap_dumper *wdh,
return FALSE;
}
g_free(log_part);
- length = strlen(buf);
+ length = (guint32)strlen(buf);
if (!wtap_dump_file_write(wdh, buf, length, err)) {
g_free(buf);
@@ -448,7 +448,7 @@ static gboolean logcat_dump_text(wtap_dumper *wdh,
return FALSE;
}
g_free(log_part);
- length = strlen(buf);
+ length = (guint32)strlen(buf);
if (!wtap_dump_file_write(wdh, buf, length, err)) {
g_free(buf);