mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-03 04:50:29 +00:00
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:
parent
56ee4a1af2
commit
824bfa9600
Notes:
sideshowbarker
2024-07-18 18:45:17 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/824bfa9600f Pull-request: https://github.com/SerenityOS/serenity/pull/6803 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue