From 08ec2341276cb7acd7d185c8aa814efcbceb6d7e Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sat, 28 Oct 2017 15:41:15 +0200 Subject: [PATCH] Related to patch #9471: pbuf: Drop casting to u8_t for increment the reference count Cast to correct type: Needed to avoid warnings about integer cast (-Wconversion) SYS_ARCH_SET cannot be used here --- src/core/pbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/pbuf.c b/src/core/pbuf.c index 39ecda68..4a270b3e 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -821,7 +821,7 @@ pbuf_ref(struct pbuf *p) { /* pbuf given? */ if (p != NULL) { - SYS_ARCH_SET(p->ref, (u8_t)(p->ref + 1)); + SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1)); LWIP_ASSERT("pbuf ref overflow", p->ref > 0); } }