Task #51973 - added.err

back to task #51973
download
Error: CPPCHECK_WARNING (CWE-628):
game-music-emu-0.6.4/gme/ext/emu2413.c:271: warning[invalidFunctionArg]: Invalid log10() argument nr 1. The value is 0 but the valid values are '4.94066e-324:'.
#  269|       return (DB_MUTE - 1);
#  270|     else
#  271|->     return Min (-(e_int32) (20.0 * log10 (d) / DB_STEP), DB_MUTE-1);  /* 0 -- 127 */
#  272|   }
#  273|   

Error: CPPCHECK_WARNING (CWE-758):
game-music-emu-0.6.4/gme/ext/emu2413.c:1071: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1069|   
# 1070|   #ifndef EMU2413_COMPACTION
# 1071|->   opll->realstep = (e_uint32) ((1 << 31) / rate);
# 1072|     opll->opllstep = (e_uint32) ((1 << 31) / (clk / 72));
# 1073|     opll->oplltime = 0;

Error: CPPCHECK_WARNING (CWE-758):
game-music-emu-0.6.4/gme/ext/emu2413.c:1072: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1070|   #ifndef EMU2413_COMPACTION
# 1071|     opll->realstep = (e_uint32) ((1 << 31) / rate);
# 1072|->   opll->opllstep = (e_uint32) ((1 << 31) / (clk / 72));
# 1073|     opll->oplltime = 0;
# 1074|     /*for (i = 0; i < 14; i++)

Error: COMPILER_WARNING (CWE-252):
game-music-emu-0.6.4/player/Music_Player.cpp: scope_hint: In function ‘const arc_type_t* identify_archive(const char*)’
game-music-emu-0.6.4/player/Music_Player.cpp:103:14: warning[-Wunused-result]: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’
#  103 |         fread( h, 1, sizeof h, in );
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~
#  101|   	if ( !in )
#  102|   		return nullptr;
#  103|-> 	fread( h, 1, sizeof h, in );
#  104|   	fclose( in );
#  105|   	header = BLARGG_4CHAR( h[0], h[1], h[2], h[3] );