]> git.meshlink.io Git - utcp/commitdiff
Avoid a compiler warning when compiling with -DNDEBUG.
authorGuus Sliepen <guus@sliepen.org>
Thu, 31 Oct 2019 19:41:04 +0000 (20:41 +0100)
committerGuus Sliepen <guus@sliepen.org>
Thu, 31 Oct 2019 19:41:04 +0000 (20:41 +0100)
utcp.c

diff --git a/utcp.c b/utcp.c
index 802d95a2ba87ea3de46d9235176f5273361e6ca7..c57a5ccfc5b90964bec0ad31ebebbed240adf5f3 100644 (file)
--- a/utcp.c
+++ b/utcp.c
@@ -1314,8 +1314,10 @@ synack:
 
                assert(data_acked >= 0);
 
 
                assert(data_acked >= 0);
 
+#ifndef NDEBUG
                int32_t bufused = seqdiff(c->snd.last, c->snd.una);
                assert(data_acked <= bufused);
                int32_t bufused = seqdiff(c->snd.last, c->snd.una);
                assert(data_acked <= bufused);
+#endif
 
                if(data_acked) {
                        buffer_get(&c->sndbuf, NULL, data_acked);
 
                if(data_acked) {
                        buffer_get(&c->sndbuf, NULL, data_acked);