This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 49d7959b96a arch/arm/stm32h5/i2c: Fix warn message about used but not 
initialized variables
49d7959b96a is described below

commit 49d7959b96a221f988733b2162c90710c7d94b2e
Author: Patrick José Pereira <[email protected]>
AuthorDate: Thu May 21 20:30:02 2026 -0300

    arch/arm/stm32h5/i2c: Fix warn message about used but not initialized 
variables
    
    Fix "-Wmaybe-uninitialized" warning messages
    
    Signed-off-by: Patrick José Pereira <[email protected]>
---
 arch/arm/src/stm32h5/stm32_i2c.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/src/stm32h5/stm32_i2c.c b/arch/arm/src/stm32h5/stm32_i2c.c
index 315b89d25ff..7b43fa8ed93 100644
--- a/arch/arm/src/stm32h5/stm32_i2c.c
+++ b/arch/arm/src/stm32h5/stm32_i2c.c
@@ -1204,11 +1204,11 @@ static void stm32_i2c_setclock(struct stm32_i2c_priv_s 
*priv,
   uint32_t t_presc_ns;
   uint32_t tsync1;
   uint32_t tsync2;
-  uint8_t scl_delay;
+  uint8_t scl_delay = 0;
   int32_t sda_delay_min;
-  uint8_t sda_delay;
-  uint16_t scl_h_period;
-  uint16_t scl_l_period;
+  uint8_t sda_delay = 0;
+  uint16_t scl_h_period = 0;
+  uint16_t scl_l_period = 0;
   uint8_t fmp = 0;
   uint8_t anfoff;
   uint8_t dnf;

Reply via email to