Skip to content

Fix for dro-Wsign-compare and convert some additional variables from signed into unsigned#150

Merged
mywave82 merged 1 commit into
adplug:masterfrom
mywave82:dro-Wsign-compare
Feb 26, 2023
Merged

Fix for dro-Wsign-compare and convert some additional variables from signed into unsigned#150
mywave82 merged 1 commit into
adplug:masterfrom
mywave82:dro-Wsign-compare

Conversation

@mywave82

Copy link
Copy Markdown
Contributor

Fix this warning and make some more of the logic work with unsigned instead of signed datatypes.

src/dro.cpp: In member function ‘virtual bool CdroPlayer::load(const string&, const CFileProvider&)’: src/dro.cpp:76:48: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
   76 |         if (this->iLength < 3 || this->iLength > fp.filesize(f) - f->pos()) {
      |                                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

…nstead of signed datatypes.

src/dro.cpp: In member function ‘virtual bool CdroPlayer::load(const string&, const CFileProvider&)’:
src/dro.cpp:76:48: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
   76 |         if (this->iLength < 3 || this->iLength > fp.filesize(f) - f->pos()) {
      |                                  ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
@mywave82 mywave82 merged commit 6ea36d6 into adplug:master Feb 26, 2023
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

Successfully merging this pull request may close these issues.

1 participant