You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2022/07/29 05:25:51 UTC

[incubator-nuttx] branch master updated: timers/watchdog: fix build warning

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

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


The following commit(s) were added to refs/heads/master by this push:
     new e88a49007d timers/watchdog: fix build warning
e88a49007d is described below

commit e88a49007def312bc7a7d8c134614f66f7071ec1
Author: hejianliang3 <he...@xiaomi.com>
AuthorDate: Tue Apr 12 15:53:06 2022 +0800

    timers/watchdog: fix build warning
    
    drivers/timers/watchdog.c:57:5: warning: "CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL" is not defined, evaluates to 0 [-Wundef]
       57 |     CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL)
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: hejianliang3 <he...@xiaomi.com>
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 drivers/timers/watchdog.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/timers/watchdog.c b/drivers/timers/watchdog.c
index cbcc82cb9d..8cbe0f3b86 100644
--- a/drivers/timers/watchdog.c
+++ b/drivers/timers/watchdog.c
@@ -53,6 +53,8 @@
 #define WATCHDOG_AUTOMONITOR_TIMEOUT_MSEC \
   (1000 * CONFIG_WATCHDOG_AUTOMONITOR_TIMEOUT)
 
+#if defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_TIMER) || \
+    defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_WORKER)
 #if (CONFIG_WATCHDOG_AUTOMONITOR_TIMEOUT == \
     CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL)
 #define WATCHDOG_AUTOMONITOR_PING_INTERVAL \
@@ -61,6 +63,7 @@
 #define WATCHDOG_AUTOMONITOR_PING_INTERVAL \
   SEC2TICK(CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL)
 #endif
+#endif
 
 #endif