summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2007-06-04 20:06:54 +0000
committerglx <glx@openttd.org>2007-06-04 20:06:54 +0000
commita81fd9805736771b8ed91db3f6cc93af5d119d04 (patch)
tree029f1e0d63c46cbf652c5b1884ad426af0b7d6d6
parent1a7c7d768f982bff42d0503b7cba30cff6cefd7b (diff)
downloadopenttd-a81fd9805736771b8ed91db3f6cc93af5d119d04.tar.xz
(svn r10037) -Fix (r10035, r10036): silence some 'may be used uninitialized' warnings
-rw-r--r--src/network/network_gui.cpp2
-rw-r--r--src/settings_gui.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 241796852..30bb22c55 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -685,7 +685,7 @@ static void NetworkStartServerWindowWndProc(Window *w, WindowEvent *e)
ShowDropDownMenu(w, _players_dropdown, _network_game_info.spectators_max, 14, 0, 0);
break;
case 15: case 16: { /* Language */
- int sel;
+ uint sel = 0;
for (uint i = 0; i < lengthof(_language_dropdown) - 1; i++) {
if (_language_dropdown[i] == STR_NETWORK_LANG_ANY + _network_game_info.server_lang) {
sel = i;
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index dac55369a..ceb8e1a07 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -151,7 +151,7 @@ static void GameOptionsWndProc(Window *w, WindowEvent *e)
ShowDropDownMenu(w, _driveside_dropdown, _opt_ptr->road_side, 11, i, 0);
} return;
case 13: case 14: { /* Setup townname dropdown */
- uint sel;
+ uint sel = 0;
for (uint i = 0; i < lengthof(_town_names) - 1; i++) {
if (_town_names[i] == STR_TOWNNAME_ORIGINAL_ENGLISH + _opt_ptr->town_name) {
sel = i;