Fixed some compilation warnings

This commit is contained in:
Souryo 2017-05-06 18:35:59 -04:00
parent 8c3402c819
commit 1db6600a64
4 changed files with 6 additions and 6 deletions

View file

@ -20,7 +20,7 @@ void BizhawkMovie::ProcessNotification(ConsoleNotificationType type, void* param
{
if(type == ConsoleNotificationType::PpuFrameDone) {
int32_t frameNumber = PPU::GetFrameCount() - 1;
if(frameNumber < _systemActionByFrame.size()) {
if(frameNumber < (int32_t)_systemActionByFrame.size()) {
uint32_t systemAction = _systemActionByFrame[frameNumber];
if(systemAction & 0x01) {
//Power, not implemented yet
@ -61,7 +61,7 @@ void BizhawkMovie::ProcessNotification(ConsoleNotificationType type, void* param
uint8_t BizhawkMovie::GetState(uint8_t port)
{
int32_t frameNumber = PPU::GetFrameCount() - 1;
if(frameNumber < _dataByFrame[0].size()) {
if(frameNumber < (int32_t)_dataByFrame[0].size()) {
return _dataByFrame[port][frameNumber];
} else {
EndMovie();
@ -137,7 +137,7 @@ bool BizhawkMovie::InitializeInputData(ZipReader & reader)
if(port <= 3) {
uint8_t portValue = 0;
for(int j = 0; j < 8 && i + j + systemActionCount < line.size(); j++) {
for(int j = 0; j < 8 && i + j + systemActionCount < (int)line.size(); j++) {
if(line[i+j+systemActionCount] != '.') {
portValue |= orValues[j];
}

View file

@ -682,7 +682,7 @@ void Debugger::ProcessVramOperation(MemoryOperationType type, uint16_t addr, uin
void Debugger::GetCallstack(int32_t* callstackAbsolute, int32_t* callstackRelative)
{
int callstackSize = (int)_callstackRelative.size() - (_hideTopOfCallstack ? 2 : 0);
for(size_t i = 0; i < callstackSize; i++) {
for(int i = 0; i < callstackSize; i++) {
callstackAbsolute[i] = _callstackAbsolute[i];
int32_t relativeAddr = _callstackRelative[i];

View file

@ -93,7 +93,7 @@ uint8_t FDS::ReadRAM(uint16_t addr)
buffer[i] = CPU::DebugReadByte(bufferAddr + i);
}
for(int j = 0; j < _fdsDiskHeaders.size(); j++) {
for(int j = 0; j < (int)_fdsDiskHeaders.size(); j++) {
bool match = true;
for(int i = 0; i < 10; i++) {
if(buffer[i] != 0xFF && buffer[i] != _fdsDiskHeaders[j][i + 14]) {

View file

@ -237,7 +237,7 @@ void SHA1::update(std::istream &is)
while(true) {
is.read(sbuf, BLOCK_BYTES - buffer.size());
buffer.append(sbuf, is.gcount());
buffer.append(sbuf, (size_t)is.gcount());
if(buffer.size() != BLOCK_BYTES) {
return;
}