Minor fixes for warnings found by gcc undefined behavior sanitizer.

This commit is contained in:
harry 2022-08-19 22:33:09 -04:00
parent f4ea336349
commit f3b33a628f
3 changed files with 3 additions and 1 deletions

View File

@ -87,6 +87,7 @@ else(WIN32)
if ( ${ASAN_ENABLE} ) if ( ${ASAN_ENABLE} )
add_definitions( -fsanitize=address -fsanitize=bounds-strict ) add_definitions( -fsanitize=address -fsanitize=bounds-strict )
add_definitions( -fsanitize=undefined -fno-sanitize=vptr )
set( ASAN_LDFLAGS -lasan -lubsan) set( ASAN_LDFLAGS -lasan -lubsan)
message( STATUS "Address Sanitizer Enabled" ) message( STATUS "Address Sanitizer Enabled" )
else() else()

View File

@ -1133,7 +1133,7 @@ void ppuPatternView_t::paintEvent(QPaintEvent *event)
xx = 0; yy = 0; xx = 0; yy = 0;
showSelector = (cycleCount < 20); showSelector = (cycleCount < 20) && (selTile.x() >= 0) && (selTile.y() >= 0);
if ( mode == 1 ) if ( mode == 1 )
{ {

View File

@ -409,6 +409,7 @@ MovieData::MovieData()
, rerecordCount(0) , rerecordCount(0)
, binaryFlag(false) , binaryFlag(false)
, loadFrameCount(-1) , loadFrameCount(-1)
, fourscore(false)
, microphone(false) , microphone(false)
, RAMInitOption(0) , RAMInitOption(0)
, RAMInitSeed(0) , RAMInitSeed(0)