mirror of https://github.com/stella-emu/stella.git
More Coverity fixes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3236 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
8b7043d74a
commit
336536745f
|
@ -17,6 +17,9 @@
|
|||
// $Id$
|
||||
//============================================================================
|
||||
|
||||
// NOTE: This code generates many errors in Coverity, and is due to be
|
||||
// replaced in an upcoming release.
|
||||
|
||||
#include <cctype>
|
||||
#include <cstdlib>
|
||||
#include <zlib.h>
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue