diff --git a/protocol/bluetooth/inc/sl_bt_stack_init.h b/protocol/bluetooth/inc/sl_bt_stack_init.h index 781de5591f..1181d3cfd2 100644 --- a/protocol/bluetooth/inc/sl_bt_stack_init.h +++ b/protocol/bluetooth/inc/sl_bt_stack_init.h @@ -18,6 +18,10 @@ #ifndef SL_BT_STACK_INIT_H #define SL_BT_STACK_INIT_H +#ifdef __cplusplus +extern "C" { +#endif + #include "sl_status.h" #include "sl_bt_api.h" #include "sl_bt_stack_config.h" @@ -173,4 +177,8 @@ static inline void sl_bt_init_whitelisting() */ sl_status_t sl_bt_init_classes(const struct sli_bgapi_class * const * classes); +#ifdef __cplusplus +} +#endif + #endif \ No newline at end of file diff --git a/util/silicon_labs/silabs_core/memory_manager/sl_malloc.h b/util/silicon_labs/silabs_core/memory_manager/sl_malloc.h index 93cb8113d3..e114b66532 100644 --- a/util/silicon_labs/silabs_core/memory_manager/sl_malloc.h +++ b/util/silicon_labs/silabs_core/memory_manager/sl_malloc.h @@ -20,6 +20,10 @@ #ifndef SL_MALLOC_H #define SL_MALLOC_H +#ifdef __cplusplus +extern "C" { +#endif + #include void *sl_malloc(size_t size); @@ -27,4 +31,8 @@ void *sl_calloc(size_t nmemb, size_t size); void *sl_realloc(void * ptr, size_t size); void sl_free(void * ptr); +#ifdef __cplusplus +} +#endif + #endif // SL_MALLOC_H diff --git a/util/third_party/crypto/mbedtls/library/psa_crypto.c b/util/third_party/crypto/mbedtls/library/psa_crypto.c index 6c26e821ce..48f307ca4b 100644 --- a/util/third_party/crypto/mbedtls/library/psa_crypto.c +++ b/util/third_party/crypto/mbedtls/library/psa_crypto.c @@ -1619,7 +1619,7 @@ static psa_status_t psa_internal_export_key( const psa_key_slot_t *slot, #if defined(MBEDTLS_PSA_BUILTIN_KEY_TYPE_RSA_KEY_PAIR) || \ defined(MBEDTLS_PSA_BUILTIN_KEY_TYPE_RSA_PUBLIC_KEY) mbedtls_rsa_context *rsa = NULL; - psa_status_t status = psa_load_rsa_representation( + status = psa_load_rsa_representation( slot->attr.type, slot->data.key.data, slot->data.key.bytes, @@ -1648,7 +1648,7 @@ static psa_status_t psa_internal_export_key( const psa_key_slot_t *slot, #if defined(MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR) || \ defined(MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_PUBLIC_KEY) mbedtls_ecp_keypair *ecp = NULL; - psa_status_t status = psa_load_ecp_representation( + status = psa_load_ecp_representation( slot->attr.type, slot->data.key.data, slot->data.key.bytes, diff --git a/util/third_party/crypto/sl_component/se_manager/src/sl_se_manager_cipher.c b/util/third_party/crypto/sl_component/se_manager/src/sl_se_manager_cipher.c index 0a40bfa898..176ffdbfca 100644 --- a/util/third_party/crypto/sl_component/se_manager/src/sl_se_manager_cipher.c +++ b/util/third_party/crypto/sl_component/se_manager/src/sl_se_manager_cipher.c @@ -1127,8 +1127,8 @@ sl_status_t sl_se_gcm_starts(sl_se_gcm_streaming_context_t *gcm_ctx, } { - SE_DataTransfer_t iv_in = SE_DATATRANSFER_DEFAULT(iv, iv_len); - SE_DataTransfer_t add_in = SE_DATATRANSFER_DEFAULT(add, add_len); + iv_in = (SE_DataTransfer_t)SE_DATATRANSFER_DEFAULT(iv, iv_len); + add_in = (SE_DataTransfer_t)SE_DATATRANSFER_DEFAULT(add, add_len); SE_DataTransfer_t ctx_out = SE_DATATRANSFER_DEFAULT(gcm_ctx->se_ctx_enc, sizeof(gcm_ctx->se_ctx_enc)); @@ -1156,8 +1156,8 @@ sl_status_t sl_se_gcm_starts(sl_se_gcm_streaming_context_t *gcm_ctx, // Do decryption if requested if (gcm_ctx->mode == SL_SE_DECRYPT) { - SE_DataTransfer_t iv_in = SE_DATATRANSFER_DEFAULT((void*)iv, iv_len); - SE_DataTransfer_t add_in = SE_DATATRANSFER_DEFAULT((void*)add, add_len); + iv_in = (SE_DataTransfer_t)SE_DATATRANSFER_DEFAULT((void*)iv, iv_len); + add_in = (SE_DataTransfer_t)SE_DATATRANSFER_DEFAULT((void*)add, add_len); SE_DataTransfer_t ctx_out = SE_DATATRANSFER_DEFAULT(gcm_ctx->se_ctx_dec, sizeof(gcm_ctx->se_ctx_dec));