summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Xiaoming <lixm.fnst@cn.fujitsu.com>2020-03-03 14:53:00 +0800
committerLi Xiaoming <lixm.fnst@cn.fujitsu.com>2020-03-03 14:53:00 +0800
commit817536732e95be247019f3aa68e0aa1764457166 (patch)
treef67835f055c6456856c5d0b347e88d26e5608786
parentf484376ec6569ae11468e3a5ad6c5dc98429def1 (diff)
cynagora/src/expire.c:38:28: error: initializer element is not constant static const time_t TMAX = ~TMIN; cynagora/src/expire.c:37:21: warning: ‘TMIN’ defined but not used [-Wunused-const-variable=] static const time_t TMIN = (time_t)1 << ((CHAR_BIT * sizeof(time_t)) - 1); Bug-AGL: SPEC-3212 Change-Id: Ie85812e404ecdb686d23f4f759f36cdf31d71202 Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
-rw-r--r--src/expire.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/expire.c b/src/expire.c
index baf9b6b..71ccdc6 100644
--- a/src/expire.c
+++ b/src/expire.c
@@ -34,8 +34,7 @@ static const int HOUR = 60*60;
static const int DAY = 24*60*60;
static const int WEEK = 7*24*60*60;
static const int YEAR = 365*24*60*60 + 24*60*60/4; /* average includes leap */
-static const time_t TMIN = (time_t)1 << ((CHAR_BIT * sizeof(time_t)) - 1);
-static const time_t TMAX = ~TMIN;
+static const time_t TMAX = ~((time_t)1 << ((CHAR_BIT * sizeof(time_t)) - 1));
/** add positives x and y with saturation */
static time_t pt_add(time_t x, time_t y)