From 90ec7ccf13709cfc6adb3df8d214ec77385f331e Mon Sep 17 00:00:00 2001 From: Badrish Chandramouli Date: Sat, 11 Dec 2021 19:34:27 -0800 Subject: [PATCH] [C#] Fixing warnings (#615) * Fixing CI warnings --- azure-pipelines-full.yml | 12 ++++++------ azure-pipelines.yml | 12 ++++++------ cc/CMakeLists.txt | 4 ++-- cs/test/TestUtils.cs | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/azure-pipelines-full.yml b/azure-pipelines-full.yml index 8877af88b..7852451a1 100644 --- a/azure-pipelines-full.yml +++ b/azure-pipelines-full.yml @@ -62,7 +62,7 @@ jobs: - job: 'cppWindows' pool: - vmImage: vs2017-win2016 + vmImage: windows-latest displayName: 'C++ (Windows)' strategy: @@ -77,10 +77,10 @@ jobs: steps: - task: CMake@1 - displayName: 'CMake .. -G"Visual Studio 15 2017 Win64"' + displayName: 'CMake .. -G"Visual Studio 16 2019"' inputs: workingDirectory: 'cc/build' - cmakeArgs: '.. -G"Visual Studio 15 2017 Win64"' + cmakeArgs: '.. -G"Visual Studio 16 2019"' - task: MSBuild@1 displayName: 'Build solution cc/build/FASTER.sln' @@ -157,7 +157,7 @@ jobs: # - job: 'cppBlobsWindows' # pool: -# vmImage: vs2017-win2016 +# vmImage: windows-latest # displayName: 'C++ Blobs (Windows)' # strategy: @@ -172,10 +172,10 @@ jobs: # steps: # - task: CMake@1 -# displayName: 'CMake .. -G"Visual Studio 15 2017 Win64" -DUSE_BLOBS=ON' +# displayName: 'CMake .. -G"Visual Studio 16 2019" -DUSE_BLOBS=ON' # inputs: # workingDirectory: 'cc/build' -# cmakeArgs: '.. -G"Visual Studio 15 2017 Win64" -DUSE_BLOBS=ON' +# cmakeArgs: '.. -G"Visual Studio 16 2019" -DUSE_BLOBS=ON' # - script: 'git clone https://github.com/microsoft/vcpkg' # workingDirectory: 'cc/build' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 90c5d83f2..739782cb4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,7 +62,7 @@ jobs: - job: 'cppWindows' pool: - vmImage: vs2017-win2016 + vmImage: windows-latest displayName: 'C++ (Windows)' strategy: @@ -77,10 +77,10 @@ jobs: steps: - task: CMake@1 - displayName: 'CMake .. -G"Visual Studio 15 2017 Win64"' + displayName: 'CMake .. -G"Visual Studio 16 2019"' inputs: workingDirectory: 'cc/build' - cmakeArgs: '.. -G"Visual Studio 15 2017 Win64"' + cmakeArgs: '.. -G"Visual Studio 16 2019"' - task: MSBuild@1 displayName: 'Build solution cc/build/FASTER.sln' @@ -163,7 +163,7 @@ jobs: # - job: 'cppBlobsWindows' # pool: -# vmImage: vs2017-win2016 +# vmImage: windows-latest # displayName: 'C++ Blobs (Windows)' # strategy: @@ -178,10 +178,10 @@ jobs: # steps: # - task: CMake@1 -# displayName: 'CMake .. -G"Visual Studio 15 2017 Win64" -DUSE_BLOBS=ON' +# displayName: 'CMake .. -G"Visual Studio 16 2019" -DUSE_BLOBS=ON' # inputs: # workingDirectory: 'cc/build' -# cmakeArgs: '.. -G"Visual Studio 15 2017 Win64" -DUSE_BLOBS=ON' +# cmakeArgs: '.. -G"Visual Studio 16 2019" -DUSE_BLOBS=ON' # - script: 'git clone https://github.com/microsoft/vcpkg' # workingDirectory: 'cc/build' diff --git a/cc/CMakeLists.txt b/cc/CMakeLists.txt index 4f92318b6..15d165af5 100644 --- a/cc/CMakeLists.txt +++ b/cc/CMakeLists.txt @@ -20,8 +20,8 @@ if (MSVC) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /RTC1 /MDd") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2 /Oi /Gy- /MD") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /OPT:REF /OPT:NOICF /INCREMENTAL:NO") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG /OPT:REF /OPT:NOICF /INCREMENTAL:NO") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /OPT:NOICF") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG /OPT:NOICF") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") diff --git a/cs/test/TestUtils.cs b/cs/test/TestUtils.cs index 7f875b451..73e130cb1 100644 --- a/cs/test/TestUtils.cs +++ b/cs/test/TestUtils.cs @@ -109,13 +109,13 @@ public enum DeviceType bool preallocateFile = false; long capacity = -1; // Capacity unspecified bool recoverDevice = false; - bool useIoCompletionPort = false; - bool disableFileBuffering = true; switch (testDeviceType) { #if WINDOWS case DeviceType.LSD: + bool useIoCompletionPort = false; + bool disableFileBuffering = true; #if NETSTANDARD || NET if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) // avoids CA1416 // Validate platform compatibility #endif