diff options
author | David Hill <dhill@conformal.com> | 2014-06-20 12:43:24 -0400 |
---|---|---|
committer | David Hill <dhill@conformal.com> | 2014-06-20 12:43:24 -0400 |
commit | 444f9e48368bdd3e1e6e3a943ecc0d10c9350ef1 (patch) | |
tree | 0309cf9189126e5d1da464c6d379e83cb1ef3a9d /src/irc/dcc | |
parent | 9d0d4d9437649ed96381120e68a8d4035f6ded7e (diff) | |
download | irssi-444f9e48368bdd3e1e6e3a943ecc0d10c9350ef1.zip |
Do not break strict-aliasing rules.
dcc-send.c:296:2: warning: dereferencing type-punned pointer
will break strict-aliasing rules
Diffstat (limited to 'src/irc/dcc')
-rw-r--r-- | src/irc/dcc/dcc-send.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/irc/dcc/dcc-send.c b/src/irc/dcc/dcc-send.c index 6d2b794d..930ef770 100644 --- a/src/irc/dcc/dcc-send.c +++ b/src/irc/dcc/dcc-send.c @@ -293,7 +293,8 @@ static void dcc_send_read_size(SEND_DCC_REC *dcc) if (dcc->count_pos != 4) return; - bytes = ntohl(*((guint32 *) dcc->count_buf)); + memcpy(&bytes, dcc->count_buf, sizeof(bytes)); + bytes = ntohl(bytes); dcc->count_pos = 0; if (dcc->waitforend && bytes == (dcc->transfd & 0xffffffff)) { |