Skip to content

Fix for herad-Wsign-compare and convert some additional variables from signed into unsigned#152

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

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

Conversation

@mywave82

Copy link
Copy Markdown
Contributor

Fix this warning by using unsigned variable/logic instead where needed.

src/herad.cpp: In member function ‘void CheradPlayer::processEvents()’: src/herad.cpp:1252:50: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
 1252 |         if (wLoopStart && wLoopEnd && (ticks_pos == total_ticks || (ticks_pos % HERAD_MEASURE_TICKS == 0 && ticks_pos / HERAD_MEASURE_TICKS + 1 == wLoopEnd)))
      |                                        ~~~~~~~~~~^~~~~~~~~~~~~~

src/herad.cpp: In member function ‘void CheradPlayer::processEvents()’:
src/herad.cpp:1252:50: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
 1252 |         if (wLoopStart && wLoopEnd && (ticks_pos == total_ticks || (ticks_pos % HERAD_MEASURE_TICKS == 0 && ticks_pos / HERAD_MEASURE_TICKS + 1 == wLoopEnd)))
      |                                        ~~~~~~~~~~^~~~~~~~~~~~~~
@mywave82 mywave82 merged commit 9403e66 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