diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2014-09-22 10:25:32 +0200 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-05-12 16:31:09 +0000 |
commit | 09eda88586b0056b80d8ef94ace351a21b38bd80 (patch) | |
tree | 950f57ade6924e0a797f93da38caa7e44cd22a9e /wiretap | |
parent | 3d8f9d4345910e09dca9c851de92d0aed953f7d7 (diff) | |
download | wireshark-09eda88586b0056b80d8ef94ace351a21b38bd80.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: Ia7091c75353092680f7108da88d1cc647dd15050
Reviewed-on: https://code.wireshark.org/review/8429
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/logcat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/logcat.c b/wiretap/logcat.c index 8679d1c594..51cb8c995f 100644 --- a/wiretap/logcat.c +++ b/wiretap/logcat.c @@ -175,8 +175,8 @@ static gint detect_version(wtap *wth, int *err, gchar **err_info) /* ensure buffer is large enough for all versions */ buffer = (guint8 *) g_malloc(sizeof(*log_entry_v2) + payload_length); - log_entry_v2 = (struct logger_entry_v2 *) buffer; - log_entry = (struct logger_entry *) buffer; + log_entry_v2 = (struct logger_entry_v2 *)(void *) buffer; + log_entry = (struct logger_entry *)(void *) buffer; /* cannot rely on __pad being 0 for v1, use heuristics to find out what * version is in use. First assume the smallest msg. */ @@ -257,7 +257,7 @@ static gboolean logcat_read_packet(struct logcat_phdr *logcat, FILE_T fh, buffer_assure_space(buf, packet_size); pd = buffer_start_ptr(buf); - log_entry = (struct logger_entry *) pd; + log_entry = (struct logger_entry *)(void *) pd; /* Copy the first two bytes of the packet. */ memcpy(pd, tmp, 2); |