Browse Source

UnitTestRunner: Fixed some build warnings on Windows

tags/2021-05-28
tpoole 8 years ago
parent
commit
7fe3e13489
6 changed files with 32 additions and 13 deletions
  1. +2
    -1
      extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner_ConsoleApp.vcxproj
  2. +2
    -1
      extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj
  3. +9
    -5
      extras/UnitTestRunner/Source/Main.cpp
  4. +8
    -4
      extras/UnitTestRunner/UnitTestRunner.jucer
  5. +9
    -0
      modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h
  6. +2
    -2
      modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp

+ 2
- 1
extras/UnitTestRunner/Builds/VisualStudio2015/UnitTestRunner_ConsoleApp.vcxproj View File

@@ -30,7 +30,6 @@
Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
@@ -81,6 +80,7 @@
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<TreatWarningAsError>true</TreatWarningAsError>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -122,6 +122,7 @@
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<TreatWarningAsError>true</TreatWarningAsError>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>


+ 2
- 1
extras/UnitTestRunner/Builds/VisualStudio2017/UnitTestRunner_ConsoleApp.vcxproj View File

@@ -31,7 +31,6 @@
Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
<WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
@@ -83,6 +82,7 @@
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<TreatWarningAsError>true</TreatWarningAsError>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -122,6 +122,7 @@
<WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<TreatWarningAsError>true</TreatWarningAsError>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>


+ 9
- 5
extras/UnitTestRunner/Source/Main.cpp View File

@@ -45,16 +45,20 @@ class ConsoleUnitTestRunner : public UnitTestRunner
};
//==============================================================================
int main (int argc, char* argv[])
int main()
{
ignoreUnused (argc, argv);
ScopedPointer<ConsoleLogger> logger;
Logger::setCurrentLogger (logger);
#if ! JUCE_DEBUG
ConsoleLogger logger;
Logger::setCurrentLogger (&logger);
#endif
ConsoleUnitTestRunner runner;
runner.runAllTests();
#if ! JUCE_DEBUG
Logger::setCurrentLogger (nullptr);
#endif
for (int i = 0; i < runner.getNumResults(); ++i)
if (runner.getResult(i)->failures > 0)
return 1;


+ 8
- 4
extras/UnitTestRunner/UnitTestRunner.jucer View File

@@ -69,9 +69,11 @@
<VS2015 targetFolder="Builds/VisualStudio2015">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="1" optimisation="1" targetName="UnitTestRunner"/>
isDebug="1" optimisation="1" targetName="UnitTestRunner" warningsAreErrors="1"
wholeProgramOptimisation="1"/>
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="32-bit"
isDebug="0" optimisation="3" targetName="UnitTestRunner"/>
isDebug="0" optimisation="3" targetName="UnitTestRunner" wholeProgramOptimisation="1"
warningsAreErrors="1"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_video" path="../../modules"/>
@@ -96,9 +98,11 @@
<VS2017 targetFolder="Builds/VisualStudio2017">
<CONFIGURATIONS>
<CONFIGURATION name="Debug" winWarningLevel="4" generateManifest="1" winArchitecture="x64"
isDebug="1" optimisation="1" targetName="UnitTestRunner"/>
isDebug="1" optimisation="1" targetName="UnitTestRunner" warningsAreErrors="1"
wholeProgramOptimisation="1"/>
<CONFIGURATION name="Release" winWarningLevel="4" generateManifest="1" winArchitecture="x64"
isDebug="0" optimisation="3" targetName="UnitTestRunner"/>
isDebug="0" optimisation="3" targetName="UnitTestRunner" warningsAreErrors="1"
wholeProgramOptimisation="1"/>
</CONFIGURATIONS>
<MODULEPATHS>
<MODULEPATH id="juce_video" path="../../modules"/>


+ 9
- 0
modules/juce_blocks_basics/littlefoot/juce_LittleFootCompiler.h View File

@@ -20,6 +20,11 @@
==============================================================================
*/
#if JUCE_MSVC
#pragma warning (push)
#pragma warning (disable: 4702)
#endif
namespace littlefoot
{
@@ -2172,3 +2177,7 @@ private:
};
}
#if JUCE_MSVC
#pragma warning (pop)
#endif

+ 2
- 2
modules/juce_blocks_basics/topology/juce_PhysicalTopologySource.cpp View File

@@ -1695,7 +1695,7 @@ struct PhysicalTopologySource::Internal
}
}
bool setName (const juce::String& name) override
bool setName (const juce::String& newName) override
{
auto index = getDeviceIndex();
@@ -1704,7 +1704,7 @@ struct PhysicalTopologySource::Internal
BlocksProtocol::HostPacketBuilder<128> p;
p.writePacketSysexHeaderBytes ((BlocksProtocol::TopologyIndex) index);
if (p.addSetBlockName (name))
if (p.addSetBlockName (newName))
{
p.writePacketSysexFooter();


Loading…
Cancel
Save