From a81fd9805736771b8ed91db3f6cc93af5d119d04 Mon Sep 17 00:00:00 2001 From: glx Date: Mon, 4 Jun 2007 20:06:54 +0000 Subject: (svn r10037) -Fix (r10035, r10036): silence some 'may be used uninitialized' warnings --- src/network/network_gui.cpp | 2 +- src/settings_gui.cpp | 2 +- 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; -- cgit v1.2.3-70-g09d2