From 7809a00d3322cbe0b7f294231231783bd4cbc4f2 Mon Sep 17 00:00:00 2001 From: YunHorn Technology Date: Wed, 21 Jun 2023 12:38:19 +0800 Subject: [PATCH] fix warning message cmox sts_ac_code --- Core/Src/sts_cmox_hmac_sha.c | 2 +- LoRaWAN/App/lora_app.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Src/sts_cmox_hmac_sha.c b/Core/Src/sts_cmox_hmac_sha.c index dab014f..51c32b5 100644 --- a/Core/Src/sts_cmox_hmac_sha.c +++ b/Core/Src/sts_cmox_hmac_sha.c @@ -46,7 +46,7 @@ uint32_t sts_hmac_verify(void) APP_LOG(TS_OFF,VLEVEL_M,"0x%02x ", hmac_result.hmac_tag[i]); } - ret = memcmp(hmac_result.hmac_tag, sts_ac_code, sizeof(sts_ac_code)); + ret = memcmp(hmac_result.hmac_tag, (void *)sts_ac_code, sizeof(sts_ac_code)); if (ret !=0) { diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index f04863d..996c7fa 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -1976,7 +1976,7 @@ void STS_REBOOT_CONFIG_Init(void) { APP_LOG(TS_OFF, VLEVEL_L, "\r\nInitial Boot with Empty Config, Flash with default config....\r\n"); OnStoreSTSCFGContextRequest(); - memset(sts_ac_code,0x0,sizeof(sts_ac_code)); + UTIL_MEM_set_8((void *)sts_ac_code, 0x00, YUNHORN_STS_AC_CODE_SIZE); HAL_Delay(1000); } else {