mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-13 14:13:32 +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 commitsd2fe7b1757
f463eda36c
This commit is contained in:
@@ -743,7 +743,7 @@ ProgressResult FFmpegImportFileHandle::WriteData(streamContext *sc)
|
||||
unsigned int pos = 0;
|
||||
while (pos < insamples)
|
||||
{
|
||||
for (size_t chn = 0; chn < (size_t)sc->m_stream->codec->channels; chn++)
|
||||
for (size_t chn = 0; (int)chn < sc->m_stream->codec->channels; chn++)
|
||||
{
|
||||
if (chn < nChannels)
|
||||
{
|
||||
|
Reference in New Issue
Block a user