adventuregamestudio / ags

AGS editor and engine source code
Other
707 stars 159 forks source link

Different signedness comparison warning in update.cpp #2568

Closed tag2015 closed 2 weeks ago

tag2015 commented 2 weeks ago

Describe the bug Sorry for the hassle, another warning is in https://github.com/adventuregamestudio/ags/blob/f8f47f233fbddf622d62850bb6d1fc08139c1b98/Engine/main/update.cpp#L95

warning: comparison of integer expressions of different signedness: 'const AGS3::fixed' {aka 'const int'} and 'unsigned int' [-Wsign-compare]

Possible solutions:

ivan-mogilko commented 2 weeks ago

I am fairly certain there may be a number of warnings in this code; are particular warnings wanted to be fixed?

Perhaps it may be better to open a single issue which lists types of warnings to be checked for particular compiler.

ivan-mogilko commented 2 weeks ago

Anyway, I used the first proposed fix, because similar AND operation is used everywhere else in the surrounding code: 9cf99a3583fcb05dd983d9ce06a513851e47dd57

tag2015 commented 2 weeks ago

I am fairly certain there may be a number of warnings in this code; are particular warnings wanted to be fixed?

Perhaps it may be better to open a single issue which lists types of warnings to be checked for particular compiler.

Using gcc, this is the only warning reported in this part of the code

tag2015 commented 2 weeks ago

Anyway, I used the first proposed fix, because similar AND operation is used everywhere else in the surrounding code: 9cf99a3

Thanks! Issue can be closed I think