diff --git a/nimble/host/src/ble_gattc.c b/nimble/host/src/ble_gattc.c index b3c8e04e12..0ff4ec28e6 100644 --- a/nimble/host/src/ble_gattc.c +++ b/nimble/host/src/ble_gattc.c @@ -4444,7 +4444,7 @@ ble_gatts_notify_multiple_custom(uint16_t conn_handle, conn = ble_hs_conn_find(conn_handle); if (conn == NULL) { - return ENOTCONN; + return BLE_HS_ENOTCONN; } /* Read missing values */ @@ -4527,7 +4527,7 @@ ble_gatts_notify_multiple(uint16_t conn_handle, BLE_HS_LOG_DEBUG("conn_handle %d\n", conn_handle); conn = ble_hs_conn_find(conn_handle); if (conn == NULL) { - return ENOTCONN; + return BLE_HS_ENOTCONN; } /** Skip sending to client that doesn't support this feature */ diff --git a/nimble/host/src/ble_gatts.c b/nimble/host/src/ble_gatts.c index c77e561b73..ee6a8a3c65 100644 --- a/nimble/host/src/ble_gatts.c +++ b/nimble/host/src/ble_gatts.c @@ -1619,8 +1619,6 @@ ble_gatts_peer_cl_sup_feat_update(uint16_t conn_handle, struct os_mbuf *om) int rc = 0; int i; - BLE_HS_LOG(DEBUG, ""); - if (!om) { return BLE_ATT_ERR_INSUFFICIENT_RES; } diff --git a/nimble/host/src/ble_l2cap_coc.c b/nimble/host/src/ble_l2cap_coc.c index a3d1b1c22d..d4cb15f971 100644 --- a/nimble/host/src/ble_l2cap_coc.c +++ b/nimble/host/src/ble_l2cap_coc.c @@ -27,6 +27,14 @@ #if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) != 0 && NIMBLE_BLE_CONNECT +#ifndef min +#define min(a, b) ((a) < (b) ? (a) : (b)) +#endif + +#ifndef max +#define max(a, b) ((a) > (b) ? (a) : (b)) +#endif + #define BLE_L2CAP_SDU_SIZE 2 STAILQ_HEAD(ble_l2cap_coc_srv_list, ble_l2cap_coc_srv); diff --git a/nimble/host/store/config/src/ble_store_config.c b/nimble/host/store/config/src/ble_store_config.c index 664b8768bf..b800a4ee58 100644 --- a/nimble/host/store/config/src/ble_store_config.c +++ b/nimble/host/store/config/src/ble_store_config.c @@ -24,6 +24,7 @@ #include "syscfg/syscfg.h" #include "host/ble_hs.h" #include "base64/base64.h" +#include "os/util.h" #include "store/config/ble_store_config.h" #include "ble_store_config_priv.h" diff --git a/porting/npl/riot/include/nimble/nimble_npl_os_log.h b/porting/npl/riot/include/nimble/nimble_npl_os_log.h index 5fcce6aeec..91c8047547 100644 --- a/porting/npl/riot/include/nimble/nimble_npl_os_log.h +++ b/porting/npl/riot/include/nimble/nimble_npl_os_log.h @@ -24,6 +24,7 @@ /* Example on how to use macro to generate module logging functions */ #define BLE_NPL_LOG_IMPL(lvl) \ + __attribute__((__format__ (__printf__, 1, 0))) \ static inline void _BLE_NPL_LOG_CAT(BLE_NPL_LOG_MODULE, \ _BLE_NPL_LOG_CAT(_, lvl))(const char *fmt, ...)\ { \