mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-24 23:33:50 +02:00
Re-fix some warnings about mixing signed and unsigned better...
... Assuming that large unsigned magnitudes with high order bit set are not the problem, but signed negatives of small magnitude may be: 1) Always cast the unsigned to signed in comparisons, not the other way. Also: 2) Cast unsigned TERM to signed by itself, before subtracting. Don't cast the result. 3) Rewrite some comparisons by moving subtracted term to other side. See commitsd2fe7b1757f463eda36c
This commit is contained in:
@@ -1217,7 +1217,7 @@ void Sequence::SetSamples(samplePtr buffer, sampleFormat format,
|
||||
// but it guards against infinite loop in case of inconsistencies
|
||||
// (too-small files, not yet seen?)
|
||||
// that cause the loop to make no progress because blen == 0
|
||||
&& (unsigned int)b < size
|
||||
&& b < (int)size
|
||||
) {
|
||||
newBlock.push_back( mBlock[b] );
|
||||
SeqBlock &block = newBlock.back();
|
||||
|
||||
Reference in New Issue
Block a user