You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/19 18:52:53 UTC

[incubator-nuttx] branch master updated: libs/libc/time/lib_gmtimer.c: Remove duplicate definition

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

gnutt 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 4d6e275  libs/libc/time/lib_gmtimer.c: Remove duplicate definition
4d6e275 is described below

commit 4d6e275fc4b7cfc9746230ee243b88d433faa46c
Author: chao.an <an...@xiaomi.com>
AuthorDate: Wed Feb 19 16:45:47 2020 +0800

    libs/libc/time/lib_gmtimer.c: Remove duplicate definition
    
    time/lib_gmtimer.c:54: warning: "SEC_PER_MIN" redefined
       54 | #define SEC_PER_MIN  ((time_t)60)
          |
    In file included from nuttx/include/nuttx/semaphore.h:48,
                     from nuttx/include/pthread.h:56,
                     from nuttx/include/signal.h:50,
                     from nuttx/include/sys/select.h:46,
                     from nuttx/include/sys/types.h:305,
                     from nuttx/include/time.h:46,
                     from time/lib_gmtimer.c:44:
    nuttx/include/nuttx/clock.h:125: note: this is the location of the previous definition
      125 | #define SEC_PER_MIN                   60L
          |
    time/lib_gmtimer.c:55: warning: "SEC_PER_HOUR" redefined
       55 | #define SEC_PER_HOUR ((time_t)60 * SEC_PER_MIN)
          |
    In file included from nuttx/include/nuttx/semaphore.h:48,
                     from nuttx/include/pthread.h:56,
                     from nuttx/include/signal.h:50,
                     from nuttx/include/sys/select.h:46,
                     from nuttx/include/sys/types.h:305,
                     from nuttx/include/time.h:46,
                     from time/lib_gmtimer.c:44:
    nuttx/include/nuttx/clock.h:138: note: this is the location of the previous definition
      138 | #define SEC_PER_HOUR           (SEC_PER_MIN  * MIN_PER_HOUR)
          |
    time/lib_gmtimer.c:56: warning: "SEC_PER_DAY" redefined
       56 | #define SEC_PER_DAY  ((time_t)24 * SEC_PER_HOUR)
          |
    In file included from nuttx/include/nuttx/semaphore.h:48,
                     from nuttx/include/pthread.h:56,
                     from nuttx/include/signal.h:50,
                     from nuttx/include/sys/select.h:46,
                     from nuttx/include/sys/types.h:305,
                     from nuttx/include/time.h:46,
                     from time/lib_gmtimer.c:44:
    nuttx/include/nuttx/clock.h:141: note: this is the location of the previous definition
      141 | #define SEC_PER_DAY            (HOURS_PER_DAY * SEC_PER_HOUR)
          |
---
 libs/libc/time/lib_gmtimer.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/libs/libc/time/lib_gmtimer.c b/libs/libc/time/lib_gmtimer.c
index b2c17fc..6012b2c 100644
--- a/libs/libc/time/lib_gmtimer.c
+++ b/libs/libc/time/lib_gmtimer.c
@@ -48,14 +48,6 @@
 #include <nuttx/time.h>
 
 /****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-#define SEC_PER_MIN  ((time_t)60)
-#define SEC_PER_HOUR ((time_t)60 * SEC_PER_MIN)
-#define SEC_PER_DAY  ((time_t)24 * SEC_PER_HOUR)
-
-/****************************************************************************
  * Private Function Prototypes
  ****************************************************************************/