Skip to content

Commit 32e3327

Browse files
committed
Silence GCC unused variable warning.
After making my previous commit to completely disable LWIP_ASSERT macro invocations, I ended up with a warning in pbuf.c where an err variable was set but only checked for success in an assert. I added a "(void)err;" reference to silence this warning.
1 parent 6f6f425 commit 32e3327

File tree

1 file changed

+2
-0
lines changed
  • libraries/net/lwip/lwip/core

1 file changed

+2
-0
lines changed

libraries/net/lwip/lwip/core/pbuf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,8 @@ pbuf_coalesce(struct pbuf *p, pbuf_layer layer)
998998
}
999999
err = pbuf_copy(q, p);
10001000
LWIP_ASSERT("pbuf_copy failed", err == ERR_OK);
1001+
/* next line references err variable even if LWIP_ASSERT is ignored. */
1002+
(void)err;
10011003
pbuf_free(p);
10021004
return q;
10031005
}

0 commit comments

Comments
 (0)