Skip to content

Commit

Permalink
address Win32 analysis warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamiras committed May 17, 2020
1 parent c056ab5 commit 06e6753
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/rcheevos.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@
<ClInclude Include="..\rcheevos\src\rcheevos\compat.h" />
<ClInclude Include="..\rcheevos\src\rcheevos\internal.h" />
<ClCompile Include="..\rcheevos\src\rcheevos\consoleinfo.c" />
<ClCompile Include="..\rcheevos\src\rcheevos\compat.c" />
<ClCompile Include="..\rcheevos\src\rcheevos\compat.c">
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="..\rcheevos\src\rcheevos\memref.c" />
<ClCompile Include="..\rcheevos\src\rcheevos\richpresence.c" />
<ClInclude Include="..\rcheevos\src\rhash\md5.h" />
Expand Down
4 changes: 2 additions & 2 deletions tests/services/AchievementRuntime_Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ TEST_CLASS(AchievementRuntime_Tests)
pAchievement3->SetConditionHitCount(0, 0, 1);
pAchievement5->SetConditionHitCount(0, 0, 1);
nSize = runtime.SaveProgressToBuffer(sBuffer.data(), nSize);
if (nSize > sBuffer.size())
if (nSize > gsl::narrow_cast<int>(sBuffer.size()))
{
sBuffer.resize(nSize);
runtime.SaveProgressToBuffer(sBuffer.data(), nSize);
Expand All @@ -480,7 +480,7 @@ TEST_CLASS(AchievementRuntime_Tests)
runtime.GetAchievementTrigger(5U)->state = RC_TRIGGER_STATE_ACTIVE;
pAchievement5->SetConditionHitCount(0, 0, 1);
nSize = runtime.SaveProgressToBuffer(sBuffer.data(), nSize);
if (nSize > sBuffer.size())
if (nSize > gsl::narrow_cast<int>(sBuffer.size()))
{
sBuffer.resize(nSize);
runtime.SaveProgressToBuffer(sBuffer.data(), nSize);
Expand Down

0 comments on commit 06e6753

Please sign in to comment.