diff --git a/src/common/ZipHandler.cxx b/src/common/ZipHandler.cxx index d3c97ba64..2f861dcee 100644 --- a/src/common/ZipHandler.cxx +++ b/src/common/ZipHandler.cxx @@ -17,6 +17,9 @@ // $Id$ //============================================================================ +// NOTE: This code generates many errors in Coverity, and is due to be +// replaced in an upcoming release. + #include #include #include diff --git a/src/common/ZipHandler.hxx b/src/common/ZipHandler.hxx index 6b9c15577..7101dae13 100644 --- a/src/common/ZipHandler.hxx +++ b/src/common/ZipHandler.hxx @@ -62,6 +62,9 @@ This class implements a thin wrapper around the zip file management code from the MAME project. + NOTE: This code generates many errors in Coverity, and is due to be + replaced in an upcoming release. + @author Wrapper class by Stephen Anthony, with main functionality by Aaron Giles */ diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index 73ca8bf70..78ae328ed 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -290,6 +290,10 @@ bool CartDebug::disassemble(bool force) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartDebug::fillDisassemblyList(BankInfo& info, uInt16 search) { + // An empty address list means that DiStella can't do a disassembly + if(info.addressList.size() == 0) + return false; + myDisassembly.list.clear(); myDisassembly.fieldwidth = 14 + myLabelLength; DiStella distella(*this, myDisassembly.list, info, DiStella::settings, @@ -993,6 +997,10 @@ string CartDebug::saveDisassembly() for(int bank = 0; bank < myConsole.cartridge().bankCount(); ++bank) { BankInfo& info = myBankInfo[bank]; + // An empty address list means that DiStella can't do a disassembly + if(info.addressList.size() == 0) + continue; + // Disassemble bank disasm.list.clear(); DiStella distella(*this, disasm.list, info, settings, diff --git a/src/debugger/DiStella.cxx b/src/debugger/DiStella.cxx index d0083ab59..b6b718ec1 100644 --- a/src/debugger/DiStella.cxx +++ b/src/debugger/DiStella.cxx @@ -31,12 +31,13 @@ DiStella::DiStella(const CartDebug& dbg, CartDebug::DisassemblyList& list, myList(list), mySettings(s), myReserved(reserved), + myOffset(0), + myPC(0), + myPCEnd(0), myLabels(labels), myDirectives(directives) { CartDebug::AddressList& addresses = info.addressList; - if(addresses.size() == 0) - return; while(!myAddressQueue.empty()) myAddressQueue.pop(); diff --git a/src/emucore/Cart4A50.cxx b/src/emucore/Cart4A50.cxx index 76a6d0a9a..30854c45c 100644 --- a/src/emucore/Cart4A50.cxx +++ b/src/emucore/Cart4A50.cxx @@ -34,7 +34,9 @@ Cartridge4A50::Cartridge4A50(const uInt8* image, uInt32 size, mySliceHigh(0), myIsRomLow(true), myIsRomMiddle(true), - myIsRomHigh(true) + myIsRomHigh(true), + myLastAddress(0), + myLastData(0) { // Copy the ROM image into my buffer // Supported file sizes are 32/64/128K, which are duplicated if necessary diff --git a/src/emucore/CartFA2.cxx b/src/emucore/CartFA2.cxx index 1ae014a27..f186b0679 100644 --- a/src/emucore/CartFA2.cxx +++ b/src/emucore/CartFA2.cxx @@ -26,17 +26,15 @@ CartridgeFA2::CartridgeFA2(const uInt8* image, uInt32 size, const OSystem& osystem) : Cartridge(osystem.settings()), myOSystem(osystem), + mySize(28 * 1024), myRamAccessTimeout(0), myCurrentBank(0) { // 29/32K version of FA2 has valid data @ 1K - 29K if(size >= 29 * 1024) - { image += 1024; - mySize = 28 * 1024; - } - else - mySize = BSPF_min(28 * 1024u, size); + else if(size < mySize) + mySize = size; // Copy the ROM image into my buffer memcpy(myImage, image, mySize); diff --git a/src/gui/ComboDialog.cxx b/src/gui/ComboDialog.cxx index 9f6a42061..4efa47417 100644 --- a/src/gui/ComboDialog.cxx +++ b/src/gui/ComboDialog.cxx @@ -88,6 +88,9 @@ ComboDialog::ComboDialog(GuiObject* boss, const GUI::Font& font, addOKCancelBGroup(wid, font); addToFocusList(wid); + + // NOTE: Coverity doesn't yet support lambdas, so it complains that 'myEvents' + // isn't initialized (when it obviously is with ADD_EVENT_POPUP) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/gui/EventMappingWidget.cxx b/src/gui/EventMappingWidget.cxx index 588983ead..b3e2fb6b8 100644 --- a/src/gui/EventMappingWidget.cxx +++ b/src/gui/EventMappingWidget.cxx @@ -37,6 +37,7 @@ EventMappingWidget::EventMappingWidget(GuiObject* boss, const GUI::Font& font, const StringList& actions, EventMode mode) : Widget(boss, font, x, y, w, h), CommandSender(boss), + myComboDialog(nullptr), myEventMode(mode), myActionSelected(-1), myRemapStatus(false),