mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #16500 from unknownbrackets/warnings
Fixes to recently introduced warnings and a couple older ones
This commit is contained in:
commit
5de3a7c252
7 changed files with 27 additions and 22 deletions
|
@ -884,7 +884,7 @@ add_library(cityhash STATIC
|
|||
ext/cityhash/city.h
|
||||
ext/cityhash/citycrc.h
|
||||
)
|
||||
include_directories(ext/cityhash)
|
||||
target_include_directories(cityhash PRIVATE ext/cityhash)
|
||||
|
||||
if(NOT MSVC)
|
||||
# These can be fast even for debug.
|
||||
|
@ -1360,7 +1360,7 @@ add_library(kirk STATIC
|
|||
ext/libkirk/kirk_engine.c
|
||||
ext/libkirk/kirk_engine.h
|
||||
)
|
||||
include_directories(ext/libkirk)
|
||||
target_include_directories(kirk PRIVATE ext/libkirk)
|
||||
|
||||
add_library(sfmt19937 STATIC
|
||||
ext/sfmt19937/SFMT.c
|
||||
|
@ -1369,19 +1369,20 @@ add_library(sfmt19937 STATIC
|
|||
ext/sfmt19937/SFMT-params.h
|
||||
ext/sfmt19937/SFMT-params19937.h
|
||||
)
|
||||
include_directories(ext/sfmt19937)
|
||||
target_compile_definitions(sfmt19937 PRIVATE SFMT_MEXP=19937)
|
||||
target_include_directories(sfmt19937 PRIVATE ext/sfmt19937)
|
||||
|
||||
add_library(xbrz STATIC
|
||||
ext/xbrz/xbrz.cpp
|
||||
ext/xbrz/xbrz.h
|
||||
)
|
||||
include_directories(ext/xbrz)
|
||||
target_include_directories(xbrz PRIVATE ext/xbrz)
|
||||
|
||||
add_library(xxhash STATIC
|
||||
ext/xxhash.c
|
||||
ext/xxhash.h
|
||||
)
|
||||
include_directories(ext/xxhash)
|
||||
target_include_directories(xxhash PRIVATE ext/xxhash)
|
||||
|
||||
set(CoreExtra)
|
||||
set(CoreExtraLibs)
|
||||
|
@ -2067,6 +2068,7 @@ if(USE_SYSTEM_ZSTD)
|
|||
target_link_libraries(${CoreLibName} ${ZSTD_LIBRARY})
|
||||
else()
|
||||
set(ZSTD_BUILD_PROGRAMS OFF CACHE BOOL "we don't need zstd programs" FORCE)
|
||||
set(ZSTD_LEGACY_SUPPORT OFF CACHE BOOL "we don't use any old zstd files" FORCE)
|
||||
add_subdirectory(ext/zstd/build/cmake EXCLUDE_FROM_ALL)
|
||||
set(CoreExtraLibs ${CoreExtraLibs} libzstd_static)
|
||||
include_directories(ext/zstd/lib)
|
||||
|
|
|
@ -46,9 +46,8 @@ void DoSet(PointerWrap &p, std::set<T> &x) {
|
|||
Do(p, *itr++);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ERROR_LOG(SAVESTATE, "Savestate error: invalid mode %d.", p.mode);
|
||||
case PointerWrap::MODE_NOOP:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ PointerWrapSection PointerWrap::Section(const char *title, int minVer, int ver)
|
|||
return PointerWrapSection(*this, -1, title);
|
||||
}
|
||||
if (!checkpoints_[curCheckpoint_].Matches(marker, offset)) {
|
||||
WARN_LOG(SAVESTATE, "Checkpoint mismatch during write! Section %s but expected %s, offset %d but expected %d", title, marker, offset, (int)checkpoints_[curCheckpoint_].offset);
|
||||
WARN_LOG(SAVESTATE, "Checkpoint mismatch during write! Section %s but expected %s, offset %d but expected %d", title, marker, (int)offset, (int)checkpoints_[curCheckpoint_].offset);
|
||||
if (curCheckpoint_ > 1) {
|
||||
WARN_LOG(SAVESTATE, "Previous checkpoint: %s (%d)", checkpoints_[curCheckpoint_ - 1].title, (int)checkpoints_[curCheckpoint_ - 1].offset);
|
||||
}
|
||||
|
@ -171,6 +171,7 @@ void Do(PointerWrap &p, std::string &x) {
|
|||
case PointerWrap::MODE_READ: x = (char*)*p.ptr; break;
|
||||
case PointerWrap::MODE_WRITE: memcpy(*p.ptr, x.c_str(), stringLen); break;
|
||||
case PointerWrap::MODE_MEASURE: break;
|
||||
case PointerWrap::MODE_NOOP: break;
|
||||
case PointerWrap::MODE_VERIFY: _dbg_assert_msg_(!strcmp(x.c_str(), (char*)*p.ptr), "Savestate verification failure: \"%s\" != \"%s\" (at %p).\n", x.c_str(), (char *)*p.ptr, p.ptr); break;
|
||||
}
|
||||
(*p.ptr) += stringLen;
|
||||
|
@ -198,6 +199,7 @@ void Do(PointerWrap &p, std::wstring &x) {
|
|||
case PointerWrap::MODE_READ: x = read(); break;
|
||||
case PointerWrap::MODE_WRITE: memcpy(*p.ptr, x.c_str(), stringLen); break;
|
||||
case PointerWrap::MODE_MEASURE: break;
|
||||
case PointerWrap::MODE_NOOP: break;
|
||||
case PointerWrap::MODE_VERIFY: _dbg_assert_msg_(x == read(), "Savestate verification failure: \"%ls\" != \"%ls\" (at %p).\n", x.c_str(), read().c_str(), p.ptr); break;
|
||||
}
|
||||
(*p.ptr) += stringLen;
|
||||
|
@ -225,6 +227,7 @@ void Do(PointerWrap &p, std::u16string &x) {
|
|||
case PointerWrap::MODE_READ: x = read(); break;
|
||||
case PointerWrap::MODE_WRITE: memcpy(*p.ptr, x.c_str(), stringLen); break;
|
||||
case PointerWrap::MODE_MEASURE: break;
|
||||
case PointerWrap::MODE_NOOP: break;
|
||||
case PointerWrap::MODE_VERIFY: _dbg_assert_msg_(x == read(), "Savestate verification failure: (at %p).\n", p.ptr); break;
|
||||
}
|
||||
(*p.ptr) += stringLen;
|
||||
|
|
|
@ -335,6 +335,8 @@ static void DoMemoryVoid(PointerWrap &p, uint32_t start, uint32_t size) {
|
|||
_dbg_assert_msg_(d[i] == storage[i], "Savestate verification failure: %d (0x%X) (at %p) != %d (0x%X) (at %p).\n", d[i], d[i], &d[i], storage[i], storage[i], &storage[i]);
|
||||
}, 0, size, 128);
|
||||
break;
|
||||
case PointerWrap::MODE_NOOP:
|
||||
break;
|
||||
}
|
||||
storage += size;
|
||||
}
|
||||
|
|
|
@ -265,7 +265,7 @@ protected:
|
|||
void DeviceLost() override;
|
||||
void DeviceRestore() override;
|
||||
|
||||
void ClearCacheNextFrame();
|
||||
void ClearCacheNextFrame() override;
|
||||
|
||||
virtual void CheckRenderResized();
|
||||
|
||||
|
|
|
@ -569,10 +569,9 @@ void TransformUnit::SubmitPrimitive(const void* vertices, const void* indices, G
|
|||
// Some games send rectangles as a series of regular triangles.
|
||||
// We look for this, but only in throughmode.
|
||||
ClipVertexData buf[6];
|
||||
int buf_index = data_index_;
|
||||
for (int i = 0; i < data_index_; ++i) {
|
||||
buf[i] = data_[i];
|
||||
}
|
||||
// Could start at data_index_ and copy to buf, but there's little reason.
|
||||
int buf_index = 0;
|
||||
_assert_(data_index_ == 0);
|
||||
|
||||
for (int vtx = 0; vtx < vertex_count; ++vtx) {
|
||||
buf[buf_index++] = vreader.Read(vtx);
|
||||
|
|
|
@ -231,7 +231,7 @@
|
|||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
|
@ -250,7 +250,7 @@
|
|||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
|
@ -267,7 +267,7 @@
|
|||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
|
@ -284,7 +284,7 @@
|
|||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
|
@ -304,7 +304,7 @@
|
|||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<EnablePREfast>false</EnablePREfast>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
|
@ -330,7 +330,7 @@
|
|||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<EnablePREfast>false</EnablePREfast>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
|
@ -356,7 +356,7 @@
|
|||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<EnablePREfast>false</EnablePREfast>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
|
@ -382,7 +382,7 @@
|
|||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=5;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>ZSTD_MULTITHREAD=1;ZSTD_LEGACY_SUPPORT=0;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<TreatWarningAsError>false</TreatWarningAsError>
|
||||
<EnablePREfast>false</EnablePREfast>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
|
|
Loading…
Add table
Reference in a new issue