diff --git a/Core/CwCheat.cpp b/Core/CwCheat.cpp index bdc314a31c..4610dd2c3d 100644 --- a/Core/CwCheat.cpp +++ b/Core/CwCheat.cpp @@ -521,7 +521,7 @@ void CWCheatEngine::Run() { case 0xC: // Code stopper if (Memory::IsValidAddress(addr)) { value = Memory::Read_U32(addr); - if (value != arg) { + if ((u32)value != arg) { SkipAllCodes(); } } diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp index 764125921f..4ca5d139c3 100644 --- a/Core/HLE/ReplaceTables.cpp +++ b/Core/HLE/ReplaceTables.cpp @@ -418,11 +418,11 @@ int GetReplacementFuncIndex(u64 hash, int funcSize) { } // TODO: Build a lookup and keep it around - for (int i = 0; i < ARRAY_SIZE(entries); i++) { + for (size_t i = 0; i < ARRAY_SIZE(entries); i++) { if (!entries[i].name) continue; if (!strcmp(name, entries[i].name)) { - return i; + return (int)i; } } return -1; diff --git a/Core/HLE/proAdhoc.cpp b/Core/HLE/proAdhoc.cpp index cd8a7a4de2..7d74318783 100644 --- a/Core/HLE/proAdhoc.cpp +++ b/Core/HLE/proAdhoc.cpp @@ -546,27 +546,30 @@ int initNetwork(SceNetAdhocctlAdhocId *adhoc_id){ server_addr.sin_family = AF_INET; server_addr.sin_port = htons(27312); // Maybe read this from config too - // Resolve dns - addrinfo * resultAddr; + // Resolve dns + addrinfo * resultAddr; addrinfo * ptr; in_addr serverIp; - iResult = getaddrinfo(g_Config.proAdhocServer.c_str(),0,NULL,&resultAddr); - if(iResult != 0){ - ERROR_LOG(SCENET, "Dns error\n"); - return iResult; + serverIp.s_addr = INADDR_NONE; + + iResult = getaddrinfo(g_Config.proAdhocServer.c_str(),0,NULL,&resultAddr); + if (iResult != 0) { + ERROR_LOG(SCENET, "Dns error\n"); + return iResult; } - for(ptr = resultAddr; ptr != NULL; ptr = ptr->ai_next){ - switch(ptr->ai_family){ + for (ptr = resultAddr; ptr != NULL; ptr = ptr->ai_next) { + switch (ptr->ai_family) { case AF_INET: serverIp = ((sockaddr_in *)ptr->ai_addr)->sin_addr; + break; } } server_addr.sin_addr = serverIp; iResult = connect(metasocket,(sockaddr *)&server_addr,sizeof(server_addr)); - if(iResult == SOCKET_ERROR){ + if (iResult == SOCKET_ERROR) { ERROR_LOG(SCENET,"Socket error"); - return iResult; - } + return iResult; + } memset(¶meter,0,sizeof(parameter)); strcpy((char *)¶meter.nickname.data, g_Config.sNickName.c_str()); parameter.channel = 1; // Fake Channel 1 diff --git a/Core/HLE/sceMp3.cpp b/Core/HLE/sceMp3.cpp index c57df90bb5..5c2d517f82 100644 --- a/Core/HLE/sceMp3.cpp +++ b/Core/HLE/sceMp3.cpp @@ -181,7 +181,7 @@ int sceMp3Decode(u32 mp3, u32 outPcmPtr) { break; if (packet.stream_index == ctx->audio_stream_index) { - avcodec_get_frame_defaults(&frame); + av_frame_unref(&frame); got_frame = 0; ret = avcodec_decode_audio4(ctx->decoder_context, &frame, &got_frame, &packet); if (ret < 0) { diff --git a/Core/HW/SimpleAT3Dec.cpp b/Core/HW/SimpleAT3Dec.cpp index d41220036c..2ba87ea63b 100644 --- a/Core/HW/SimpleAT3Dec.cpp +++ b/Core/HW/SimpleAT3Dec.cpp @@ -121,7 +121,7 @@ bool SimpleAT3::Decode(void* inbuf, int inbytes, uint8_t *outbuf, int *outbytes) *outbytes = 0; int got_frame = 0; - avcodec_get_frame_defaults(frame_); + av_frame_unref(frame_); int len = avcodec_decode_audio4(codecCtx_, frame_, &got_frame, &packet); if (len < 0) { diff --git a/Core/MIPS/MIPSAnalyst.cpp b/Core/MIPS/MIPSAnalyst.cpp index 7f013d5768..f5b95baa4e 100644 --- a/Core/MIPS/MIPSAnalyst.cpp +++ b/Core/MIPS/MIPSAnalyst.cpp @@ -588,7 +588,7 @@ skip: const char *LookupHash(u64 hash, int funcsize) { for (auto it = hashMap.begin(), end = hashMap.end(); it != end; ++it) { - if (it->hash == hash && it->size == funcsize) { + if (it->hash == hash && (int)it->size == funcsize) { return it->name; } } diff --git a/Core/PSPLoaders.cpp b/Core/PSPLoaders.cpp index 3c2a84e85e..22ba595a53 100644 --- a/Core/PSPLoaders.cpp +++ b/Core/PSPLoaders.cpp @@ -150,7 +150,7 @@ bool Load_PSP_ISO(const char *filename, std::string *error_string) std::string bootpath("disc0:/PSP_GAME/SYSDIR/EBOOT.BIN"); // Bypass Chinese translation patches, see comment above. - for (int i = 0; i < ARRAY_SIZE(altBootNames); i++) { + for (size_t i = 0; i < ARRAY_SIZE(altBootNames); i++) { if (pspFileSystem.GetFileInfo(altBootNames[i]).exists) { bootpath = altBootNames[i]; } diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index 50f472fc4a..aae7b36d1a 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -1130,6 +1130,7 @@ void TextureCache::SetTexture(bool force) { break; } +#ifndef USING_GLES2 if (i > 0) { int tw = gstate.getTextureWidth(i); int th = gstate.getTextureWidth(i); @@ -1138,6 +1139,7 @@ void TextureCache::SetTexture(bool force) { else if (th != 1 && th != (gstate.getTextureHeight(i - 1) >> 1)) badMipSizes = true; } +#endif } // In addition, simply don't load more than level 0 if g_Config.bMipMap is false. @@ -1181,7 +1183,7 @@ void TextureCache::SetTexture(bool force) { #ifndef USING_GLES2 if (badMipSizes) { glGenerateMipmap(GL_TEXTURE_2D); - } else { + } else { for (int i = 1; i <= maxLevel; i++) { LoadTextureLevel(*entry, i, replaceImages, dstFmt); }