Merge pull request #4942 from unknownbrackets/warnings

Fix some warnings, possibly fix Symbian
This commit is contained in:
Henrik Rydgård committed 2013-12-30 00:28:48 -08:00
commit 079d9c04dd
21 files changed
+45 -15

No files matched your search

+1 -1
View File
@@ -473,7 +473,7 @@ void Config::Save() {
pinnedPaths->Clear();
for (size_t i = 0; i < vPinnedPaths.size(); ++i) {
char keyName[64];
snprintf(keyName, sizeof(keyName), "Path%d", i);
snprintf(keyName, sizeof(keyName), "Path%d", (int)i);
pinnedPaths->Set(keyName, vPinnedPaths[i]);
}
+1
View File
@@ -17,6 +17,7 @@
#pragma once
#include "Globals.h"
#include "Core/Debugger/SymbolMap.h"
#include "Core/MIPS/MIPSAnalyst.h"
enum DisassemblyLineType { DISTYPE_OPCODE, DISTYPE_MACRO, DISTYPE_DATA, DISTYPE_OTHER };
+1 -1
View File
@@ -1550,7 +1550,7 @@ u32 AllocMemoryBlock(const char *pname, u32 type, u32 size, u32 paramsAddr) {
if (!block->IsValid())
{
delete block;
ERROR_LOG(SCEKERNEL, "AllocMemoryBlock(%s, %i, %08x, %08x): allocation failed");
ERROR_LOG(SCEKERNEL, "AllocMemoryBlock(%s, %i, %08x, %08x): allocation failed", pname, type, size, paramsAddr);
return SCE_KERNEL_ERROR_MEMBLOCK_ALLOC_FAILED;
}
SceUID uid = kernelObjects.Create(block);
+7
View File
@@ -15,11 +15,18 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include <cstring>
#include "Core/Host.h"
#include "Core/Debugger/SymbolMap.h"
Host *host;
int PMixer::Mix(short *stereoout, int numSamples) {
memset(stereoout, 0, numSamples * 2 * sizeof(short));
return numSamples;
}
bool Host::AttemptLoadSymbolMap() {
symbolMap.Clear();
return false;
+1 -1
View File
@@ -26,7 +26,7 @@ class PMixer {
public:
PMixer() {}
virtual ~PMixer() {}
virtual int Mix(short *stereoout, int numSamples) {memset(stereoout,0,numSamples*2*sizeof(short)); return numSamples;}
virtual int Mix(short *stereoout, int numSamples);
};
class Host {
+1 -1
View File
@@ -188,7 +188,7 @@ Opcode Read_Instruction(u32 address, bool resolveReplacements)
return Opcode(op);
}
} else {
ERROR_LOG(HLE, "Replacement, but no replacement op? %08x", inst);
ERROR_LOG(HLE, "Replacement, but no replacement op? %08x", inst.encoding);
}
}
return inst;
+5 -1
View File
@@ -300,6 +300,8 @@ void System_Wake() {
}
}
static bool pspIsInited = false;
bool PSP_Init(const CoreParameter &coreParam, std::string *error_string) {
INFO_LOG(BOOT, "PPSSPP %s", PPSSPP_GIT_VERSION);
@@ -325,11 +327,12 @@ bool PSP_Init(const CoreParameter &coreParam, std::string *error_string) {
*error_string = "Unable to initialize rendering engine.";
}
}
pspIsInited = success;
return success;
}
bool PSP_IsInited() {
return currentMIPS != 0;
return pspIsInited;
}
void PSP_Shutdown() {
@@ -353,6 +356,7 @@ void PSP_Shutdown() {
GPU_Shutdown();
host->SetWindowTitle(0);
currentMIPS = 0;
pspIsInited = false;
}
void PSP_RunLoopUntil(u64 globalticks) {
+2
View File
@@ -15,6 +15,8 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include <set>
#include "Core/MemMap.h"
#include "Core/Host.h"
#include "Core/Config.h"
+2
View File
@@ -17,6 +17,7 @@
#include <map>
#include <algorithm>
#include <cstring>
#include "Core/MemMap.h"
#include "Core/Reporting.h"
@@ -26,6 +27,7 @@
#include "GPU/Directx9/FramebufferDX9.h"
#include "GPU/Common/TextureDecoder.h"
#include "Core/Config.h"
#include "Core/Host.h"
#include "ext/xxhash.h"
#include "math/math_util.h"
+6 -1
View File
@@ -17,6 +17,7 @@
#include <map>
#include <algorithm>
#include <cstring>
#include "Core/Host.h"
#include "Core/MemMap.h"
@@ -27,6 +28,7 @@
#include "GPU/GLES/Framebuffer.h"
#include "GPU/Common/TextureDecoder.h"
#include "Core/Config.h"
#include "Core/Host.h"
#include "ext/xxhash.h"
#include "math/math_util.h"
@@ -1125,6 +1127,7 @@ void TextureCache::SetTexture(bool force) {
// If GLES3 is available, we can preallocate the storage, which makes texture loading more efficient.
GLenum dstFmt = GetDestFormat(format, gstate.getClutPaletteFormat());
#if defined(MAY_HAVE_GLES3)
if (gl_extensions.GLES3 && maxLevel > 0) {
// glTexStorage2D requires the use of sized formats.
GLenum storageFmt = GL_RGBA8;
@@ -1137,10 +1140,12 @@ void TextureCache::SetTexture(bool force) {
ERROR_LOG(G3D, "Unknown dstfmt %i", (int)dstFmt);
break;
}
// TODO: This may cause bugs, since it hard-sets the texture w/h, and we might try to reuse it later with a different size.
glTexStorage2D(GL_TEXTURE_2D, maxLevel + 1, storageFmt, w, h);
// Make sure we don't use glTexImage2D after glTexStorage2D.
replaceImages = true;
}
#endif
// GLES2 doesn't have support for a "Max lod" which is critical as PSP games often
// don't specify mips all the way down. As a result, we either need to manually generate
@@ -1165,7 +1170,7 @@ void TextureCache::SetTexture(bool force) {
#ifndef USING_GLES2
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 0);
#else
#elif defined(MAY_HAVE_GLES3)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
#endif
}
+1 -2
View File
@@ -1,5 +1,4 @@
#pragma once
#include "Core/CPU.h"
#include "Core/Core.h"
+2
View File
@@ -19,6 +19,8 @@
#include "../main.h"
static const int numCPUs = 1;
//#include "DbgHelp.h"
extern HMENU g_hPopupMenus;
+2 -1
View File
@@ -20,7 +20,6 @@
#include "Windows/WndMainWindow.h"
#include "Core/Core.h"
#include "Core/CPU.h"
#include "Core/HLE/HLE.h"
#include "Core/CoreTiming.h"
#include "Core/MIPS/MIPSAnalyst.h"
@@ -36,6 +35,8 @@
#include <windowsx.h>
#include <commctrl.h>
static const int numCPUs = 1;
// How long (max) to wait for Core to pause before clearing temp breakpoints.
const int TEMP_BREAKPOINT_WAIT_MS = 100;
-1
View File
@@ -9,7 +9,6 @@
#include "Windows/Debugger/Debugger_Lists.h"
#include "Windows/Debugger/CPURegsInterface.h"
#include "Globals.h"
#include "Core/CPU.h"
#include "Core/MIPS/MIPSDebugInterface.h"
#include "Core/Debugger/Breakpoints.h"
#include <vector>
+2
View File
@@ -10,6 +10,8 @@
#include "../../Core/HLE/sceKernelThread.h"
#include "util/text/utf8.h"
static const int numCPUs = 1;
enum { TL_NAME, TL_PROGRAMCOUNTER, TL_ENTRYPOINT, TL_PRIORITY, TL_STATE, TL_WAITTYPE, TL_COLUMNCOUNT };
enum { BPL_TYPE, BPL_OFFSET, BPL_SIZELABEL, BPL_OPCODE, BPL_CONDITION, BPL_HITS, BPL_ENABLED, BPL_COLUMNCOUNT };
enum { SF_ENTRY, SF_ENTRYNAME, SF_CURPC, SF_CUROPCODE, SF_CURSP, SF_FRAMESIZE, SF_COLUMNCOUNT };
-1
View File
@@ -4,7 +4,6 @@
#include "Windows/W32Util/DialogManager.h"
#include "Core/MemMap.h"
#include "Core/CPU.h"
#include "Core/Debugger/DebugInterface.h"
+4 -4
View File
@@ -1,12 +1,12 @@
// NOTE: Apologies for the quality of this code, this is really from pre-opensource Dolphin - that is, 2003.
#pragma once
#include "../W32Util/DialogManager.h"
#include "Windows/W32Util/DialogManager.h"
#include "../../Core/MemMap.h"
#include "../../Core/CPU.h"
#include "Core/MemMap.h"
#include "Core/Core.h"
#include "../../Core/Debugger/DebugInterface.h"
#include "Core/Debugger/DebugInterface.h"
class CVFPUDlg : public Dialog
{
@@ -6,6 +6,8 @@
#include "GPU/Debugger/Breakpoints.h"
#include <algorithm>
static const int numCPUs = 1;
const PTCHAR CtrlDisplayListView::windowClass = _T("CtrlDisplayListView");
const int POPUP_SUBMENU_ID_DISPLAYLISTVIEW = 8;
+1
View File
@@ -19,6 +19,7 @@
#include "gfx_es2/glsl_program.h"
#include "Windows/GEDebugger/GEDebugger.h"
#include "Windows/GEDebugger/SimpleGLWindow.h"
#include "Core/System.h"
#include "GPU/GPUInterface.h"
#include "GPU/Common/GPUDebugInterface.h"
#include "GPU/GPUState.h"
+2
View File
@@ -56,6 +56,8 @@
#include "Common/StringUtils.h"
#include "main.h"
static const int numCPUs = 1;
static PMixer *curMixer;
float mouseDeltaX = 0;
+2
View File
@@ -77,6 +77,8 @@
#define ENABLE_TOUCH 0
static const int numCPUs = 1;
int verysleepy__useSendMessage = 1;
const UINT WM_VERYSLEEPY_MSG = WM_APP + 0x3117;