Skip to content

Commit

Permalink
Merge pull request #1017 from cjee21/cli
Browse files Browse the repository at this point in the history
Windows CLI: Resolve warnings + Set C++20 std and L3 warning for MSVC2022
  • Loading branch information
JeromeMartinez authored Feb 9, 2025
2 parents afd6140 + 57fd784 commit a136ddc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Project/MSVC2022/CLI/MediaInfo.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@
<AdditionalIncludeDirectories>../../../Source;../../../../MediaInfoLib/Source;../../../../ZenLib/Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp20</LanguageStandard>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -142,6 +144,8 @@
<AdditionalIncludeDirectories>../../../Source;../../../../MediaInfoLib/Source;../../../../ZenLib/Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp20</LanguageStandard>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -153,8 +157,9 @@
<AdditionalIncludeDirectories>../../../Source;../../../../MediaInfoLib/Source;../../../../ZenLib/Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpplatest</LanguageStandard>
<LanguageStandard>stdcpp20</LanguageStandard>
<Optimization>Disabled</Optimization>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -166,8 +171,9 @@
<AdditionalIncludeDirectories>../../../Source;../../../../MediaInfoLib/Source;../../../../ZenLib/Source;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpplatest</LanguageStandard>
<LanguageStandard>stdcpp20</LanguageStandard>
<Optimization>Disabled</Optimization>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -183,6 +189,8 @@
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<DebugInformationFormat>None</DebugInformationFormat>
<ControlFlowGuard>Guard</ControlFlowGuard>
<LanguageStandard>stdcpp20</LanguageStandard>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -199,6 +207,8 @@
<OmitFramePointers>true</OmitFramePointers>
<DebugInformationFormat>None</DebugInformationFormat>
<ControlFlowGuard>Guard</ControlFlowGuard>
<LanguageStandard>stdcpp20</LanguageStandard>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -215,6 +225,8 @@
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<ControlFlowGuard>Guard</ControlFlowGuard>
<GuardEHContMetadata>true</GuardEHContMetadata>
<LanguageStandard>stdcpp20</LanguageStandard>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -232,6 +244,8 @@
<ControlFlowGuard>Guard</ControlFlowGuard>
<GuardEHContMetadata>true</GuardEHContMetadata>
<GuardSignedReturns>true</GuardSignedReturns>
<LanguageStandard>stdcpp20</LanguageStandard>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down
2 changes: 2 additions & 0 deletions Source/CLI/CLI_Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ int main(int argc, char* argv_ansi[])

//Initialize terminal (to fix Unicode output on Win32)
#if defined(_MSC_VER) && defined(UNICODE)
#pragma warning( suppress : 6031 ) //Return value of '_setmode' is ignored as it is "best effort" and failures are ignored
_setmode(_fileno(stdout), _O_U8TEXT);
#pragma warning( suppress : 6031 )
_setmode(_fileno(stderr), _O_U8TEXT);
CLI_Option_Bom=false;
#endif
Expand Down

0 comments on commit a136ddc

Please # to comment.