Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comparison is always true due to limited range of data type #237

Closed
xanscale opened this issue Dec 12, 2012 · 2 comments
Closed

comparison is always true due to limited range of data type #237

xanscale opened this issue Dec 12, 2012 · 2 comments
Assignees

Comments

@xanscale
Copy link
Contributor

Battlescape/MiniMapView.cpp: In member function ‘virtual void OpenXcom::MiniMapView::mousePress(OpenXcom::Action_, OpenXcom::State_)’:
Battlescape/MiniMapView.cpp:183:39: warning: comparison is always true due to limited range of data type [-Wtype-limits]

Menu/DeleteGameState.cpp: In constructor ‘OpenXcom::DeleteGameState::DeleteGameState(OpenXcom::Game_, const wstring&, Uint8, std::string, Uint8, OpenXcom::SavedGameState_)’:
Menu/DeleteGameState.cpp:63:18: warning: comparison is always true due to limited range of data type [-Wtype-limits]

Menu/ErrorMessageState.cpp: In member function ‘void OpenXcom::ErrorMessageState::create(const string&, const wstring&, Uint8, std::string, Uint8)’:
Menu/ErrorMessageState.cpp:77:18: warning: comparison is always true due to limited range of data type [-Wtype-limits]
Menu/ErrorMessageState.cpp:104:18: warning: comparison is always false due to limited range of data type [-Wtype-limits]

@karvanit
Copy link
Contributor

In the ErrorMessageState.cpp the proper code should check against 255 or ((Uint8)-1). Either will remove the warning.

@ghost ghost assigned SupSuper Feb 23, 2013
@xanscale
Copy link
Contributor Author

xanscale commented Apr 6, 2013

updated issue description due to some change

SupSuper added a commit that referenced this issue Sep 4, 2013
Fix: Bug report #237 - Interceptor can never enter air combat again, when game was saved while in air combat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants