View Issue Details

IDProjectCategoryView StatusLast Update
0001038OpenMPT[All Projects] libopenmptpublic2017-10-03 09:11
ReporterjcowgillAssigned Tomanx 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionOpenMPT 1.27.01.00 / libopenmpt 0.3.1 (current stable) 
Target VersionOpenMPT 1.27.02.00 / libopenmpt 0.3.2 (upcoming stable)Fixed in VersionOpenMPT 1.27.02.00 / libopenmpt 0.3.2 (upcoming stable) 
Summary0001038: soundlib/Load_dtm.cpp:326:62: warning: '*' in boolean context
Description

Compiling libopenmpt 0.3.1 using GCC 7 gives this warning:

soundlib/Load_dtm.cpp: In member function 'bool OpenMPT::CSoundFile::ReadDTM(OpenMPT::FileReader&, OpenMPT::CSoundFile::ModLoadingFlags)':
soundlib/Load_dtm.cpp:326:62: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context]
   if(numSamples >= MAX_SAMPLES || !chunk.CanRead(numSamples) * sizeof(DTMSample))
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~

It looks like there is a typo here and the multiplication should be part of the value passed to CanRead.

TagsNo tags attached.
Has the bug occurred in previous versions?No, it was fine in 0.2.8760~beta27-1
Tested code revision (in case you know it)

Activities

manx

manx

2017-10-03 09:08

administrator   ~0003287

Fixed in r9026 (0.4) and r9027 (0.3).

Issue History

Date Modified Username Field Change
2017-10-03 08:41 jcowgill New Issue
2017-10-03 08:45 manx Assigned To => manx
2017-10-03 08:45 manx Status new => assigned
2017-10-03 09:08 manx Status assigned => resolved
2017-10-03 09:08 manx Resolution open => fixed
2017-10-03 09:08 manx Fixed in Version => OpenMPT 1.27.02.00 / libopenmpt 0.3.2 (upcoming stable)
2017-10-03 09:08 manx Note Added: 0003287
2017-10-03 09:11 manx Target Version => OpenMPT 1.27.02.00 / libopenmpt 0.3.2 (upcoming stable)