DynamicLoader: Fix compiler warning

math.cpp: In function 'int64_t __moddi3(int64_t, int64_t)':
math.cpp:168:13: error: 'r' may be used uninitialized
[-Werror=maybe-uninitialized]
  168 |     return ((int64_t)r ^ s) - s; // negate if s == -1
      |             ^~~~~~~~~~
This commit is contained in:
Gunnar Beutner 2021-05-02 05:45:03 +02:00 committed by Andreas Kling
parent 56ee4a1af2
commit 824bfa9600
Notes: sideshowbarker 2024-07-18 18:45:17 +09:00

View file

@ -163,7 +163,7 @@ int64_t __moddi3(int64_t a, int64_t b)
b = (b ^ s) - s; // negate if s == -1
s = a >> bits_in_dword_m1; // s = a < 0 ? -1 : 0
a = (a ^ s) - s; // negate if s == -1
uint64_t r;
uint64_t r = 0;
__udivmoddi4(a, b, &r);
return ((int64_t)r ^ s) - s; // negate if s == -1
}