Skip to content

Commit

Permalink
slirp: fix unused return value, spotted by clang
Browse files Browse the repository at this point in the history
Fix clang errors like:
  CC    slirp/cksum.o
/src/qemu/slirp/cksum.c:78:3: error: expression result unused [-Wunused-value]
                REDUCE;
/src/qemu/slirp/cksum.c:45:66: note: instantiated from:

Signed-off-by: Blue Swirl <[email protected]>
  • Loading branch information
blueswirl committed Apr 18, 2010
1 parent 156aa89 commit 7107944
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion slirp/cksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
*/

#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x)
#define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; ADDCARRY(sum);}
#define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; \
(void)ADDCARRY(sum);}

int cksum(struct mbuf *m, int len)
{
Expand Down

0 comments on commit 7107944

Please sign in to comment.