diff options
author | Tim Angus <tim@ngus.net> | 2014-08-30 17:29:09 +0100 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2015-03-17 11:38:07 +0000 |
commit | 61f78e272375bba4c55e8a976c9f73e6ed1b5713 (patch) | |
tree | fa832f3c63db10d0ddb9d936e05b2a5e20b1bb33 /src/qcommon | |
parent | f67547574ba6f11f8e52ceba614992ca953aae4a (diff) |
Fix a few warnings
Diffstat (limited to 'src/qcommon')
-rw-r--r-- | src/qcommon/md4.c | 10 | ||||
-rw-r--r-- | src/qcommon/msg.c | 2 | ||||
-rw-r--r-- | src/qcommon/net_ip.c | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src/qcommon/md4.c b/src/qcommon/md4.c index b37c87b4..0eb23a50 100644 --- a/src/qcommon/md4.c +++ b/src/qcommon/md4.c @@ -177,12 +177,10 @@ static void mdfour_update(struct mdfour *md, byte *in, int n) static void mdfour_result(struct mdfour *md, byte *out) { - m = md; - - copy4(out, m->A); - copy4(out+4, m->B); - copy4(out+8, m->C); - copy4(out+12, m->D); + copy4(out, md->A); + copy4(out+4, md->B); + copy4(out+8, md->C); + copy4(out+12, md->D); } static void mdfour(byte *out, byte *in, int n) diff --git a/src/qcommon/msg.c b/src/qcommon/msg.c index aaed712a..f7001d7b 100644 --- a/src/qcommon/msg.c +++ b/src/qcommon/msg.c @@ -247,7 +247,7 @@ int MSG_ReadBits( msg_t *msg, int bits ) { } msg->readcount = (msg->bit>>3)+1; } - if ( sgn ) { + if ( sgn && bits > 0 && bits < 32 ) { if ( value & ( 1 << ( bits - 1 ) ) ) { value |= -1 ^ ( ( 1 << bits ) - 1 ); } diff --git a/src/qcommon/net_ip.c b/src/qcommon/net_ip.c index fdbe75cc..bb528d99 100644 --- a/src/qcommon/net_ip.c +++ b/src/qcommon/net_ip.c @@ -1616,7 +1616,7 @@ Called from NET_Sleep which uses select() to determine which sockets have seen a void NET_Event(fd_set *fdr) { byte bufData[MAX_MSGLEN + 1]; - netadr_t from; + netadr_t from = {0}; msg_t netmsg; while(1) |