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
[NOSQUASH] Fix some warnings #13586
[NOSQUASH] Fix some warnings #13586
Conversation
I had noticed the warnings and they were distracting me. I like the prospect of having these fixed. |
@@ -4376,7 +4376,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event) | |||
|
|||
ItemStack slct = list_selected->getItem(m_selected_item->i); | |||
|
|||
for (s32 i = 0; i < list_s->getSize(); i++) { | |||
for (s32 i = 0; i < (s32)list_s->getSize(); i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What type does getSize
return? We do not need 32 bits here, should change the type of i
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getSize
returns an u32.
InventoryList
(see inventory.h
) seems to use u32
everywhere. But there's also for example MoveAction
(see inventrymanager.h
), which uses s16
.
It would probably be good to use s32
everywhere (after all u16 could get too small for things like creative inventories). But doing that change would require more work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
irr_ptr
unittests.(Note: If not defined, macros, such as
__GNUC__
, are replaced 0, so this is fine.)The minimum curl version is now specified as 7.68.0. This is the version on ubuntu 20.04.The actual minimum is probably 7.56.0, but I'm not sure if the other parts of the code use newer functions.
FYI, ubuntu 18.04 seems to have curl 7.58.0.
The minimum curl version is now specified as 7.56.0.
(I'm assuming invlist size does not use the full range of values in u32. We should really start using one datatype for invlist indices everywhere at some point...)
To do
This PR is a Ready for Review.
How to test