Browse Source

去掉部分编译警告

master
zhaohe 1 year ago
parent
commit
04a821d35a
  1. 10
      include/znordic.h
  2. 1
      src/znordic.c

10
include/znordic.h

@ -102,11 +102,10 @@ const char* hex2str(const uint8_t* data, uint16_t len);
#define ZERROR_CHECK(err_code) \ #define ZERROR_CHECK(err_code) \
do { \ do { \
const uint32_t LOCAL_ERR_CODE = (err_code); \
if (LOCAL_ERR_CODE != NRF_SUCCESS) { \
ZLOGI("%s:%d ZERROR_CHECK(%s) fail:%d", __FILE__, __LINE__, #err_code, LOCAL_ERR_CODE); \
NRF_LOG_PROCESS(); \
APP_ERROR_CHECK(LOCAL_ERR_CODE); \
const uint32_t _zecode = (err_code); \
if (_zecode != NRF_SUCCESS) { \
ZLOGI("%s:%d ZERROR_CHECK(%s) fail:%d", __FILE__, __LINE__, #err_code, _zecode); \
APP_ERROR_CHECK(_zecode); \
} \ } \
} while (0) } while (0)
@ -114,7 +113,6 @@ const char* hex2str(const uint8_t* data, uint16_t len);
do { \ do { \
if (!(expr)) { \ if (!(expr)) { \
ZLOGI("%s:%d ZASSERT(%s) fail", __FILE__, __LINE__, #expr); \ ZLOGI("%s:%d ZASSERT(%s) fail", __FILE__, __LINE__, #expr); \
NRF_LOG_PROCESS(); \
APP_ERROR_CHECK_BOOL(false); \ APP_ERROR_CHECK_BOOL(false); \
} \ } \
} while (0) } while (0)

1
src/znordic.c

@ -13,6 +13,7 @@
#include "nrf_log_ctrl.h" #include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h" #include "nrf_log_default_backends.h"
#include "nrfx_rtc.h" #include "nrfx_rtc.h"
#include "ble_dfu.h"
/********************************************************************* /*********************************************************************
* INCLUDES * INCLUDES
*/ */

Loading…
Cancel
Save