Skip to content

Commit d811760

Browse files
thugheskartben
authored andcommitted
net: lib: coap: Remove unused function
Building with clang warns: subsys/net/lib/coap/coap_link_format.c:39:20: error: unused function 'append_be16' [-Werror,-Wunused-function] static inline bool append_be16(struct coap_packet *cpkt, uint16_t data) Signed-off-by: Tom Hughes <[email protected]>
1 parent 1f653ae commit d811760

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

subsys/net/lib/coap/coap_link_format.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,6 @@ static inline bool append_u8(struct coap_packet *cpkt, uint8_t data)
3636
return true;
3737
}
3838

39-
static inline bool append_be16(struct coap_packet *cpkt, uint16_t data)
40-
{
41-
if (!cpkt) {
42-
return false;
43-
}
44-
45-
if (cpkt->max_len - cpkt->offset < 2) {
46-
return false;
47-
}
48-
49-
cpkt->data[cpkt->offset++] = data >> 8;
50-
cpkt->data[cpkt->offset++] = (uint8_t) data;
51-
52-
return true;
53-
}
54-
5539
static inline bool append(struct coap_packet *cpkt, const uint8_t *data, uint16_t len)
5640
{
5741
if (!cpkt || !data) {

0 commit comments

Comments
 (0)