summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2019-03-25 22:45:32 +0000
committerPeterN <peter@fuzzle.org>2019-03-26 20:54:40 +0000
commite453572b6ab9feeacd4fcbd660d954aec44c4777 (patch)
tree16a6f46f81608733f50b29cf07b53b808fcf599d /src/strings.cpp
parent03ca3190c9b73de3e43fe1e7e2293b8c1e3aa3d5 (diff)
downloadopenttd-e453572b6ab9feeacd4fcbd660d954aec44c4777.tar.xz
Codechange: Initialise a few variables that -flto seems to think could possibly be uninitialised
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index 204c68c20..c3669e5dc 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -118,7 +118,8 @@ void SetDParamMaxValue(uint n, uint64 max_value, uint min_count, FontSize size)
*/
void SetDParamMaxDigits(uint n, uint count, FontSize size)
{
- uint front, next;
+ uint front = 0;
+ uint next = 0;
GetBroadestDigit(&front, &next, size);
uint64 val = count > 1 ? front : next;
for (; count > 1; count--) {