From 7107944a7b72ec31366c30d747fb91dee07ebc88 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sun, 18 Apr 2010 14:27:46 +0000 Subject: [PATCH] slirp: fix unused return value, spotted by clang 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 --- slirp/cksum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slirp/cksum.c b/slirp/cksum.c index a044ec17cc..c3b45f7b3d 100644 --- a/slirp/cksum.c +++ b/slirp/cksum.c @@ -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) {