diff options
author | Alexander Færøy <ahf@torproject.org> | 2020-11-20 22:37:38 +0000 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2020-11-25 17:16:24 +0000 |
commit | 764063153955fe5e0db505802247108e32b7480e (patch) | |
tree | bc4043e7b3a88f9df233eafb3fbf42e519e4bed1 /src/test/test_stats.c | |
parent | fd8097978607629c3e25a8db0c91ac20ce7086fb (diff) | |
download | tor-764063153955fe5e0db505802247108e32b7480e.tar.gz tor-764063153955fe5e0db505802247108e32b7480e.zip |
Fix build on 32-bit Windows.
Currently Tor fails with the following error:
src/test/test_stats.c: In function ‘test_rephist_v3_onions’:
src/test/test_stats.c:527:22: error: overflow in implicit constant conversion [-Werror=overflow]
update_approx_time(10101010101);
This patch changes the constant passed to update_approx_time() to avoid
the overflow in the implicit conversion.
See: tor#40199
Diffstat (limited to 'src/test/test_stats.c')
-rw-r--r-- | src/test/test_stats.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/test_stats.c b/src/test/test_stats.c index 64d89cf1e9..25ee837f2f 100644 --- a/src/test/test_stats.c +++ b/src/test/test_stats.c @@ -524,7 +524,9 @@ test_rephist_v3_onions(void *arg) /* Initialize the subsystems */ hs_cache_init(); rep_hist_hs_stats_init(0); - update_approx_time(10101010101); + + /* Change time to 03-01-2002 23:36 UTC */ + update_approx_time(1010101010); /* HS stats should be zero here */ hs_v3_stats = rep_hist_get_hs_v3_stats(); |