Skip to content

Commit 0342deb

Browse files
galakcarlescufi
authored andcommitted
Bluetooth: Mesh: Fix compiler warning
When building with an LLVM toolchain get the following warning: bluetooth/mesh/pb_adv.c:774:4: error: expression which evaluates to zero treated as a null pointer constant of type 'void *' [-Werror,-Wnon-literal-null-conversion] PROV_BEARER_LINK_STATUS_SUCCESS); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix by adding a cast to (void *). Signed-off-by: Kumar Gala <[email protected]>
1 parent 0e93ffc commit 0342deb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

subsys/bluetooth/mesh/pb_adv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ static void link_open(struct prov_rx *rx, struct net_buf_simple *buf)
771771
/* Ignore errors, message will be attempted again if we keep receiving link open: */
772772
(void)bearer_ctl_send_unacked(
773773
ctl_buf_create(LINK_ACK, NULL, 0, RETRANSMITS_ACK),
774-
PROV_BEARER_LINK_STATUS_SUCCESS);
774+
(void *)PROV_BEARER_LINK_STATUS_SUCCESS);
775775
return;
776776
}
777777

@@ -786,7 +786,7 @@ static void link_open(struct prov_rx *rx, struct net_buf_simple *buf)
786786

787787
err = bearer_ctl_send_unacked(
788788
ctl_buf_create(LINK_ACK, NULL, 0, RETRANSMITS_ACK),
789-
PROV_BEARER_LINK_STATUS_SUCCESS);
789+
(void *)PROV_BEARER_LINK_STATUS_SUCCESS);
790790
if (err) {
791791
reset_adv_link();
792792
return;

0 commit comments

Comments
 (0)