diff options
author | harry <hrosen2016@gmail.com> | 2022-08-20 05:33:09 +0300 |
---|---|---|
committer | harry <hrosen2016@gmail.com> | 2022-08-20 05:33:09 +0300 |
commit | f3b33a628ff436f54028c7a905cb25893649ae99 (patch) | |
tree | a01305c42212b340afb47a4314a8f8bff80c9f10 | |
parent | f4ea3363492f71505f627bd133202ea8d51ffc1c (diff) |
Minor fixes for warnings found by gcc undefined behavior sanitizer.
-rw-r--r-- | src/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/drivers/Qt/ppuViewer.cpp | 2 | ||||
-rw-r--r-- | src/movie.cpp | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dad47fd2..8ef081d4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -87,6 +87,7 @@ else(WIN32) if ( ${ASAN_ENABLE} ) add_definitions( -fsanitize=address -fsanitize=bounds-strict ) + add_definitions( -fsanitize=undefined -fno-sanitize=vptr ) set( ASAN_LDFLAGS -lasan -lubsan) message( STATUS "Address Sanitizer Enabled" ) else() diff --git a/src/drivers/Qt/ppuViewer.cpp b/src/drivers/Qt/ppuViewer.cpp index 101e26de..d151da42 100644 --- a/src/drivers/Qt/ppuViewer.cpp +++ b/src/drivers/Qt/ppuViewer.cpp @@ -1133,7 +1133,7 @@ void ppuPatternView_t::paintEvent(QPaintEvent *event) xx = 0; yy = 0; - showSelector = (cycleCount < 20); + showSelector = (cycleCount < 20) && (selTile.x() >= 0) && (selTile.y() >= 0); if ( mode == 1 ) { diff --git a/src/movie.cpp b/src/movie.cpp index 6e6140cd..9bc3eb99 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -409,6 +409,7 @@ MovieData::MovieData() , rerecordCount(0)
, binaryFlag(false)
, loadFrameCount(-1)
+ , fourscore(false)
, microphone(false)
, RAMInitOption(0)
, RAMInitSeed(0)
|