From 1275d05913e7ad40208fd34746748ff9ac3324b3 Mon Sep 17 00:00:00 2001 From: Michal Labedzki Date: Mon, 22 Sep 2014 10:25:32 +0200 Subject: 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 Tested-by: Petri Dish Buildbot Tested-by: Michal Labedzki Reviewed-by: Michal Labedzki --- wiretap/logcat_text.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'wiretap/logcat_text.c') 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); -- cgit v1.2.1