Fixed minor compile warnings with gcc/clang.

This commit is contained in:
Stephen Anthony 2017-10-09 19:14:49 -02:30
parent 3fddc03ff6
commit aa755c7270
6 changed files with 46 additions and 42 deletions

View File

@ -423,12 +423,14 @@ bool Debugger::writeTrap(uInt16 t)
uInt32 Debugger::getBaseAddress(uInt32 addr, bool read) uInt32 Debugger::getBaseAddress(uInt32 addr, bool read)
{ {
if((addr & 0x1080) == 0x0000) // (addr & 0b 0001 0000 1000 0000) == 0b 0000 0000 0000 0000 if((addr & 0x1080) == 0x0000) // (addr & 0b 0001 0000 1000 0000) == 0b 0000 0000 0000 0000
{
if(read) if(read)
// ADDR_TIA read (%xxx0 xxxx 0xxx ????) // ADDR_TIA read (%xxx0 xxxx 0xxx ????)
return addr & 0x000f; // 0b 0000 0000 0000 1111 return addr & 0x000f; // 0b 0000 0000 0000 1111
else else
// ADDR_TIA write (%xxx0 xxxx 0x?? ????) // ADDR_TIA write (%xxx0 xxxx 0x?? ????)
return addr & 0x003f; // 0b 0000 0000 0011 1111 return addr & 0x003f; // 0b 0000 0000 0011 1111
}
// ADDR_ZPRAM (%xxx0 xx0x 1??? ????) // ADDR_ZPRAM (%xxx0 xx0x 1??? ????)
if((addr & 0x1280) == 0x0080) // (addr & 0b 0001 0010 1000 0000) == 0b 0000 0000 1000 0000 if((addr & 0x1280) == 0x0080) // (addr & 0b 0001 0010 1000 0000) == 0b 0000 0000 1000 0000

View File

@ -1617,9 +1617,10 @@ void DebuggerParser::executeTrapwriteif()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Wrapper function for trap(if)s // Wrapper function for trap(if)s
void DebuggerParser::executeTraps(bool read, bool write, const string& command, bool hasCond) void DebuggerParser::executeTraps(bool read, bool write, const string& command,
bool hasCond)
{ {
int ofs = hasCond ? 1 : 0; uInt32 ofs = hasCond ? 1 : 0;
uInt32 begin = args[ofs]; uInt32 begin = args[ofs];
uInt32 end = argCount == 2 + ofs ? args[1 + ofs] : begin; uInt32 end = argCount == 2 + ofs ? args[1 + ofs] : begin;

View File

@ -210,7 +210,8 @@ class Controller : public Serializable
*/ */
virtual string about(bool swappedPorts) const virtual string about(bool swappedPorts) const
{ {
return name() + " in " + (myJack == Left ^ swappedPorts ? "left port" : "right port"); return name() + " in " + ((myJack == Left) ^ swappedPorts ?
"left port" : "right port");
} }
/** /**