From d642742956728f4cd11d35f7d64bc61ba972dab3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 26 Feb 2022 12:51:46 +0000 Subject: [PATCH] [Minor] Mark `c` in Kahan sum volatile --- src/lua/lua_tensor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lua/lua_tensor.c b/src/lua/lua_tensor.c index 9731b17c7..76756e148 100644 --- a/src/lua/lua_tensor.c +++ b/src/lua/lua_tensor.c @@ -637,7 +637,7 @@ static inline rspamd_tensor_num_t mean_vec (rspamd_tensor_num_t *x, int n) { rspamd_tensor_num_t s = 0; - rspamd_tensor_num_t c = 0; + volatile rspamd_tensor_num_t c = 0; /* https://en.wikipedia.org/wiki/Kahan_summation_algorithm */ for (int i = 0; i < n; i ++) { -- 2.39.5