Add an explicit cast to time_t
authorMatt Caswell <matt@openssl.org>
Wed, 12 Sep 2018 15:49:19 +0000 (16:49 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 13 Sep 2018 14:42:26 +0000 (15:42 +0100)
Caused a compilation failure in some environments

Fixes #7204

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7205)

(cherry picked from commit bc278f30f0b766bfb82426c641dc1d51ace4a994)

test/ct_test.c

index ea90923d74b3751d89cb66f60a13fbb3dd89140b..88a8b7732f27b70512d70acc23ab93440546dd8e 100644 (file)
@@ -542,8 +542,8 @@ static int test_default_ct_policy_eval_ctx_time_is_now()
 {
     int success = 0;
     CT_POLICY_EVAL_CTX *ct_policy_ctx = CT_POLICY_EVAL_CTX_new();
-    const time_t default_time = CT_POLICY_EVAL_CTX_get_time(ct_policy_ctx) /
-            1000;
+    const time_t default_time =
+        (time_t)(CT_POLICY_EVAL_CTX_get_time(ct_policy_ctx) / 1000);
     const time_t time_tolerance = 600;  /* 10 minutes */
 
     if (fabs(difftime(time(NULL), default_time)) > time_tolerance) {