From: <sv...@op...> - 2024-08-13 14:23:24
|
Author: manx Date: Tue Aug 13 16:23:16 2024 New Revision: 21421 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21421 Log: [Ref] Silence MSVC static analyser brain-damage. Modified: trunk/OpenMPT/soundlib/Load_669.cpp Modified: trunk/OpenMPT/soundlib/Load_669.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_669.cpp Tue Aug 13 07:15:51 2024 (r21420) +++ trunk/OpenMPT/soundlib/Load_669.cpp Tue Aug 13 16:23:16 2024 (r21421) @@ -249,7 +249,15 @@ // Weird stuff happening in corehop.669 with effects > 8... they seem to do the same thing as if the high bit wasn't set, but the sample also behaves strangely. if(command < static_cast<uint8>(std::size(effTrans))) { +#if MPT_COMPILER_MSVC +#pragma warning(push) +// false-positive +#pragma warning(disable:6385) // Reading invalid data from 'effTrans'. +#endif m->command = effTrans[command]; +#if MPT_COMPILER_MSVC +#pragma warning(pop) +#endif } else { m->command = CMD_NONE; |