test_bridge: Resolve control reaching the end of a non-void function
mctp_binding_bridge_rx() was missing a return:
tests/test_bridge.c: In function ‘mctp_binding_bridge_rx’:
tests/test_bridge.c:60:1: error: no return statement in function returning non-void [-Werror=return-type]
60 | }
| ^
cc1: all warnings being treated as errors
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I2a52e872c4d4a0923e0fb14caf555c78dc57eabc
diff --git a/tests/test_bridge.c b/tests/test_bridge.c
index 43b5d76..4728b28 100644
--- a/tests/test_bridge.c
+++ b/tests/test_bridge.c
@@ -35,7 +35,7 @@
return 0;
}
-static int mctp_binding_bridge_rx(struct mctp_binding_bridge *binding,
+static void mctp_binding_bridge_rx(struct mctp_binding_bridge *binding,
uint8_t key)
{
struct mctp_pktbuf *pkt;
@@ -44,6 +44,7 @@
pkt = mctp_pktbuf_alloc(&binding->binding,
sizeof(struct mctp_hdr) + 1);
+ assert(pkt);
hdr = mctp_pktbuf_hdr(pkt);
hdr->flags_seq_tag = MCTP_HDR_FLAG_SOM | MCTP_HDR_FLAG_EOM;