Fix a gcc warning about possible fall through
[oweals/openssl.git] / test / ct_test.c
index 45dd2e92f5808bb0dcbfcdd7eff60117601cb2db..6c848af0a17fd5bff233405022bdf70af750f952 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -19,7 +19,7 @@
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
 #include "testutil.h"
-#include "openssl/crypto.h"
+#include <openssl/crypto.h>
 
 #ifndef OPENSSL_NO_CT
 /* Used when declaring buffers to read text files into */
@@ -501,10 +501,11 @@ static int test_default_ct_policy_eval_ctx_time_is_now(void)
     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;
+                                1000;
     const time_t time_tolerance = 600;  /* 10 minutes */
 
-    if (!TEST_uint_le(fabs(difftime(time(NULL), default_time)), time_tolerance))
+    if (!TEST_uint_le((unsigned int)fabs(difftime(time(NULL), default_time)),
+                      (unsigned int)time_tolerance))
         goto end;
 
     success = 1;