From 34f9db71c5477a5c6fe2d24cdd2ed30511ff77c4 Mon Sep 17 00:00:00 2001 From: Carlo Parata Date: Wed, 22 Dec 2021 16:06:08 +0100 Subject: [PATCH] Fix warnings when using gcc with optimization --- library.properties | 2 +- src/lsm6dsox_reg.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/library.properties b/library.properties index facfc72..0ca81ae 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=STM32duino LSM6DSOX -version=2.1.0 +version=2.1.1 author=SRA maintainer=stm32duino sentence=Ultra Low Power inertial measurement unit. diff --git a/src/lsm6dsox_reg.c b/src/lsm6dsox_reg.c index 7dfde50..8b104b9 100644 --- a/src/lsm6dsox_reg.c +++ b/src/lsm6dsox_reg.c @@ -10503,6 +10503,10 @@ int32_t lsm6dsox_mode_set(lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx, ret = 0; + /* FIXME: Remove warnings with STM32CubeIDE */ + ctrl3_c.not_used_01 = 0; + ctrl4_c.not_used_01 = 0; + /* reading input configuration */ xl_hm_mode = ( (uint8_t)val->ui.xl.odr & 0x10U ) >> 4; xl_ulp_en = ( (uint8_t)val->ui.xl.odr & 0x20U ) >> 5;