From 45ef0d2aef9bbba92460e19129b35f0da9729610 Mon Sep 17 00:00:00 2001 From: Trond Einar Snekvik Date: Tue, 4 Jan 2022 16:37:10 +0100 Subject: [PATCH] Bluetooth: Mesh: Use double pointer in bt_mesh_app_key_resolve The signature of bt_mesh_app_key_resolve expresses pointer to a 16 byte array as a const uint8_t *app_key[16], which is actually an array of 16 byte pointers. The intended type is equivalent to a double pointer to const uint8_t, but trips up GCC 11, which actually checks this. Signed-off-by: Trond Einar Snekvik --- subsys/bluetooth/mesh/app_keys.c | 2 +- subsys/bluetooth/mesh/app_keys.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/mesh/app_keys.c b/subsys/bluetooth/mesh/app_keys.c index b47f122c7b2..119e1ed8137 100644 --- a/subsys/bluetooth/mesh/app_keys.c +++ b/subsys/bluetooth/mesh/app_keys.c @@ -445,7 +445,7 @@ ssize_t bt_mesh_app_keys_get(uint16_t net_idx, uint16_t app_idxs[], size_t max, int bt_mesh_keys_resolve(struct bt_mesh_msg_ctx *ctx, struct bt_mesh_subnet **sub, - const uint8_t *app_key[16], uint8_t *aid) + const uint8_t **app_key, uint8_t *aid) { struct app_key *app = NULL; diff --git a/subsys/bluetooth/mesh/app_keys.h b/subsys/bluetooth/mesh/app_keys.h index 150679a8332..f3fba0d4591 100644 --- a/subsys/bluetooth/mesh/app_keys.h +++ b/subsys/bluetooth/mesh/app_keys.h @@ -41,7 +41,7 @@ int bt_mesh_app_key_set(uint16_t app_idx, uint16_t net_idx, */ int bt_mesh_keys_resolve(struct bt_mesh_msg_ctx *ctx, struct bt_mesh_subnet **sub, - const uint8_t *app_key[16], uint8_t *aid); + const uint8_t **app_key, uint8_t *aid); /** @brief Iterate through all matching application keys and call @c cb on each. *