mirror of https://github.com/stella-emu/stella.git
Some small issues detected by 'cppcheck'. There looks to be quite a
few more ... git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3020 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
958d8940fc
commit
bc1308db23
|
@ -263,7 +263,7 @@ static void init( init_t* impl, atari_ntsc_setup_t const* setup )
|
|||
float* out = impl->to_rgb;
|
||||
int n;
|
||||
|
||||
//n = burst_count; FIXME: dead code detected by llvm scan-build
|
||||
n = burst_count; // FIXME: dead code detected by llvm scan-build
|
||||
do
|
||||
{
|
||||
float const* in = decoder;
|
||||
|
|
|
@ -568,15 +568,15 @@ bool CartDebug::removeLabel(const string& label)
|
|||
LabelToAddr::iterator iter = myUserAddresses.find(label);
|
||||
if(iter != myUserAddresses.end())
|
||||
{
|
||||
// Erase the label
|
||||
myUserAddresses.erase(iter);
|
||||
mySystem.setDirtyPage(iter->second);
|
||||
|
||||
// And also erase the address assigned to it
|
||||
// Erase the address assigned to the label
|
||||
AddrToLabel::iterator iter2 = myUserLabels.find(iter->second);
|
||||
if(iter2 != myUserLabels.end())
|
||||
myUserLabels.erase(iter2);
|
||||
|
||||
// Erase the label itself
|
||||
mySystem.setDirtyPage(iter->second);
|
||||
myUserAddresses.erase(iter);
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -737,7 +737,6 @@ string CartDebug::loadListFile()
|
|||
while(!in.eof())
|
||||
{
|
||||
string line, addr_s;
|
||||
int addr = -1;
|
||||
|
||||
getline(in, line);
|
||||
|
||||
|
@ -749,6 +748,7 @@ string CartDebug::loadListFile()
|
|||
|
||||
// Swallow first value, then get actual numerical value for address
|
||||
// We need to read the address as a string, since it may contain 'U'
|
||||
int addr = -1;
|
||||
buf >> addr >> addr_s;
|
||||
if(addr_s.length() == 0)
|
||||
continue;
|
||||
|
|
|
@ -208,7 +208,7 @@ bool PromptWidget::handleKeyDown(StellaKey key, StellaMod mod)
|
|||
|
||||
scrollToCurrent();
|
||||
int len = _promptEndPos - _promptStartPos;
|
||||
if(len > 256) len = 256;
|
||||
if(len > 255) len = 255;
|
||||
|
||||
int lastDelimPos = -1;
|
||||
char delimiter = '\0';
|
||||
|
|
|
@ -984,6 +984,7 @@ int gen_c_source(struct font* pf, char *path)
|
|||
fontname);
|
||||
|
||||
fprintf(ofp, "\n} // End of namespace GUI\n\n#endif\n");
|
||||
fcloise(ofp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue