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

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


The following commit(s) were added to refs/heads/master by this push:
     new 80c2b4319 testing/ostest: fix uninitialized variable warning in wdog 
test
80c2b4319 is described below

commit 80c2b43197dd4b4be088519f3287377c51d56384
Author: hujun5 <[email protected]>
AuthorDate: Mon Jan 26 19:52:18 2026 +0800

    testing/ostest: fix uninitialized variable warning in wdog test
    
    Initialize the flags variable to 0 to fix compiler warning about
    potential use of uninitialized variable. The flags variable is
    conditionally assigned in wdtest_rand() based on callback count.
    
    Signed-off-by: hujun5 <[email protected]>
---
 testing/ostest/wdog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testing/ostest/wdog.c b/testing/ostest/wdog.c
index c00a7f9b6..273a680e9 100644
--- a/testing/ostest/wdog.c
+++ b/testing/ostest/wdog.c
@@ -147,7 +147,7 @@ static void wdtest_rand(FAR struct wdog_s *wdog, FAR 
wdtest_param_t *param,
   clock_t    wdset_tick;
   sclock_t   delay_tick;
   sclock_t   diff;
-  irqstate_t flags;
+  irqstate_t flags = 0;
 
   /* Perform multiple iterations with random delays. */
 

Reply via email to