diff options
author | Li Xiaoming <lixm.fnst@cn.fujitsu.com> | 2020-03-03 14:53:00 +0800 |
---|---|---|
committer | Li Xiaoming <lixm.fnst@cn.fujitsu.com> | 2020-03-03 14:53:00 +0800 |
commit | 817536732e95be247019f3aa68e0aa1764457166 (patch) | |
tree | f67835f055c6456856c5d0b347e88d26e5608786 | |
parent | f484376ec6569ae11468e3a5ad6c5dc98429def1 (diff) |
fix(expire.c): remove build error and warningjellyfish_9.99.4jellyfish_9.99.3jellyfish_9.99.2jellyfish_9.99.1jellyfish/9.99.4jellyfish/9.99.3jellyfish/9.99.2jellyfish/9.99.19.99.49.99.39.99.29.99.1
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.c | 3 |
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) |