Ticket #50 (closed task: fixed)
Suspicious warnings when building for x86-64
| Reported by: | belegdol | Owned by: | daelstorm |
|---|---|---|---|
| Priority: | major | Milestone: | Release 0.2.0 |
| Component: | museek_general | Version: | 0.1.12 |
| Keywords: | Cc: |
Description
I have submitted museek+ into Fedora Extras, users will be able to install it with yum install museek+ soonish. During the review process, the reviewer reported that building for x86-64 generates the following warnings:
./Muhelp/string_ext.hh:61: warning: comparison is always true due to limited range of data type ./Muhelp/string_ext.hh:64: warning: comparison is always false due to limited range of data type ./Muhelp/string_ext.hh:79: warning: comparison is always true due to limited range of data type ./Muhelp/string_ext.hh:82: warning: comparison is always false due to limited range of data type ./Muhelp/string_ext.hh:97: warning: comparison is always true due to limited range of data type ./Muhelp/string_ext.hh:100: warning: comparison is always false due to limited range of data type ./Muhelp/string_ext.hh:114: warning: comparison is always true due to limited range of data type ./Muhelp/string_ext.hh:117: warning: comparison is always false due to limited range of data type
He said that they look suspicious. Could you please have a look?
Attachments
Change History
Changed 4 years ago by cooldwind@…
-
attachment
museek+-r744-muhelp-x86_64.patch
added
Changed 4 years ago by cooldwind@…
-
attachment
museek+-r744-muhelp-x86_64.2.patch
added
Correct more variables which I missed in the previous patch.

std::string::npos is size_t, which is bigger than int in x86_64. Using size_t where appropiate.