]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Mark `c` in Kahan sum volatile
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 26 Feb 2022 12:51:46 +0000 (12:51 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 26 Feb 2022 13:32:26 +0000 (13:32 +0000)
src/lua/lua_tensor.c

index 9731b17c7df67b76e46a6a80afe2f07a374747d2..76756e14836572c0cb6d7f509f93f0f1e82b8d69 100644 (file)
@@ -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 ++) {