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

commit 01ddfeedc1ec4c8da408710d832b1735d7448a60
Author: Bowen Wang <[email protected]>
AuthorDate: Fri Nov 6 00:20:34 2026 +0800

    drivers/timers/watchdog: print the status with unsigned formats
    
    The timeout and timeleft fields of struct watchdog_status_s are
    uint32_t, but wdog_read() printed them with PRId32, so a timeout of
    2^31 ms or more read back as a negative number.
    
    Signed-off-by: Bowen Wang <[email protected]>
---
 drivers/timers/watchdog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/timers/watchdog.c b/drivers/timers/watchdog.c
index 2f5031c96fc..589668cf57f 100644
--- a/drivers/timers/watchdog.c
+++ b/drivers/timers/watchdog.c
@@ -599,8 +599,8 @@ static ssize_t wdog_read(FAR struct file *filep, FAR char 
*buffer,
           buflen,
           "Status       :\n"
           "  flags      : 0x%08" PRIx32 "\n"
-          "  timeout    : %" PRId32 "\n"
-          "  timeleft   : %" PRId32 "\n",
+          "  timeout    : %" PRIu32 "\n"
+          "  timeleft   : %" PRIu32 "\n",
           status.flags, status.timeout, status.timeleft
         );
   if (ret < 0)

Reply via email to