block: compile full_match() only when client support is enabled

With `-DENABLE_CLIENT_MODE=OFF` (i.e. `COAP_CLIENT_SUPPORT=0`), `full_match()` in `src/coap_block.c` is defined but its only caller is compiled out, producing `-Wunused-function` (fatal in -Werror builds):

```
src/coap_block.c:479:1: error: unused function 'full_match' [-Werror=-Wunused-function]
```

Wrap the static-inline definition in the same `#if COAP_CLIENT_SUPPORT` guard as its caller.

Signed-off-by: warter666 <121139223+Warterkk@users.noreply.github.com>
This commit is contained in:
Guancheng Wang authored and Jon Shallow committed 2026-09-19 12:19:59 +02:00
1 parent 899a9e533a
commit 6cb2addb1e
1 file changed
+2
+2
View File
@@ -475,11 +475,13 @@ coap_context_set_max_block_size_lkd(coap_context_t *context, size_t max_block_si
return 1;
}
#if COAP_CLIENT_SUPPORT
COAP_STATIC_INLINE int
full_match(const uint8_t *a, size_t alen,
const uint8_t *b, size_t blen) {
return alen == blen && (alen == 0 || memcmp(a, b, alen) == 0);
}
#endif /* COAP_CLIENT_SUPPORT */
coap_lg_xmit_t *
coap_find_lg_xmit(coap_session_t *session, coap_pdu_t *pdu) {