summaryrefslogtreecommitdiff
path: root/wiretap/logcat_text.c
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2014-09-22 10:25:32 +0200
committerMichal Labedzki <michal.labedzki@tieto.com>2014-09-26 09:10:38 +0000
commit1275d05913e7ad40208fd34746748ff9ac3324b3 (patch)
treec32bce76f4fe6b87577273e8249ea64cf0434266 /wiretap/logcat_text.c
parente179870a12296cd39b19ce01422ba4296d22c9a1 (diff)
downloadwireshark-1275d05913e7ad40208fd34746748ff9ac3324b3.tar.gz
Reduce compilator warnings
warning: cast from 'const guint8 *' (aka 'const unsigned char *') to 'const guint16 *' (aka 'const unsigned short *') increases required alignment from 1 to 2 [-Wcast-align] warning: cast from 'const guint8 *' (aka 'const unsigned char *') to 'const struct logger_entry *' increases required alignment from 1 to 4 [-Wcast-align] Change-Id: I1ef8bfedb31c3f633166405689d8d788d45365db Reviewed-on: https://code.wireshark.org/review/4236 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'wiretap/logcat_text.c')
-rw-r--r--wiretap/logcat_text.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/wiretap/logcat_text.c b/wiretap/logcat_text.c
index 006e82c025..89ca100d76 100644
--- a/wiretap/logcat_text.c
+++ b/wiretap/logcat_text.c
@@ -64,8 +64,8 @@ static gint buffered_detect_version(const guint8 *pd)
guint8 *msg_end;
guint16 msg_len;
- log_entry_v2 = (const struct logger_entry_v2 *) pd;
- log_entry = (const struct logger_entry *) pd;
+ log_entry = (const struct logger_entry *)(const void *) pd;
+ log_entry_v2 = (const struct logger_entry_v2 *)(const void *) pd;
/* must contain at least priority and two nulls as separator */
if (log_entry->len < 3)
@@ -459,8 +459,8 @@ static gboolean logcat_text_dump_text(wtap_dumper *wdh,
logcat_version = pseudo_header->logcat.version;
}
- log_entry = (const struct logger_entry *) pd;
- log_entry_v2 = (const struct logger_entry_v2 *) pd;
+ log_entry = (const struct logger_entry *)(const void *) pd;
+ log_entry_v2 = (const struct logger_entry_v2 *)(const void *) pd;
payload_length = GINT32_FROM_LE(log_entry->len);
pid = GINT32_FROM_LE(log_entry->pid);