Skip to content

Fix for mid-Wsign-compare and convert some additional variables from signed into unsigned #154

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

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

Conversation

@mywave82

Copy link
Copy Markdown
Contributor

Fix these warnings:

src/mid.cpp: In member function ‘virtual void CmidPlayer::rewind(int)’: src/mid.cpp:995:46: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘long int’ [-Wsign-compare]
  995 |                     if (track[curtrack].tend > flen) // no music after end of file
      |                         ~~~~~~~~~~~~~~~~~~~~~^~~~~~
src/mid.cpp:1013:57: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
 1013 |                     strnlen((char *)data + i, flen - i) < flen - i)
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/mid.cpp:1017:57: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
 1017 |                     strnlen((char *)data + i, flen - i) < flen - i)
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/mid.cpp:1021:57: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
 1021 |                     strnlen((char *)data + i, flen - i) < flen - i)
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/mid.cpp:1108:62: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘long int’ [-Wsign-compare]
 1108 |                 while (datalook(sierra_pos-2) != 0xff && pos < flen)
      |                                                          ~~~~^~~~~~

rc/mid.cpp: In member function ‘virtual void CmidPlayer::rewind(int)’:
src/mid.cpp:995:46: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘long int’ [-Wsign-compare]
  995 |                     if (track[curtrack].tend > flen) // no music after end of file
      |                         ~~~~~~~~~~~~~~~~~~~~~^~~~~~
src/mid.cpp:1013:57: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
 1013 |                     strnlen((char *)data + i, flen - i) < flen - i)
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/mid.cpp:1017:57: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
 1017 |                     strnlen((char *)data + i, flen - i) < flen - i)
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/mid.cpp:1021:57: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Wsign-compare]
 1021 |                     strnlen((char *)data + i, flen - i) < flen - i)
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
src/mid.cpp:1108:62: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘long int’ [-Wsign-compare]
 1108 |                 while (datalook(sierra_pos-2) != 0xff && pos < flen)
      |                                                          ~~~~^~~~~~
@mywave82 mywave82 merged commit 67afaea 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