diff options
Diffstat (limited to 'source/compiler-core')
| -rw-r--r-- | source/compiler-core/windows/slang-win-visual-studio-util.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/compiler-core/windows/slang-win-visual-studio-util.cpp b/source/compiler-core/windows/slang-win-visual-studio-util.cpp index e97a998d6..21830bd47 100644 --- a/source/compiler-core/windows/slang-win-visual-studio-util.cpp +++ b/source/compiler-core/windows/slang-win-visual-studio-util.cpp @@ -69,7 +69,7 @@ static SlangResult _readRegistryKey(const char* path, const char* keyName, Strin // Make easier to set up the array -static DownstreamCompilerMatchVersion _makeVersion(int main) +[[maybe_unused]] static DownstreamCompilerMatchVersion _makeVersion(int main) { DownstreamCompilerMatchVersion version; version.type = SLANG_PASS_THROUGH_VISUAL_STUDIO; @@ -77,7 +77,7 @@ static DownstreamCompilerMatchVersion _makeVersion(int main) return version; } -static DownstreamCompilerMatchVersion _makeVersion(int main, int dot) +[[maybe_unused]] static DownstreamCompilerMatchVersion _makeVersion(int main, int dot) { DownstreamCompilerMatchVersion version; version.type = SLANG_PASS_THROUGH_VISUAL_STUDIO; @@ -149,6 +149,7 @@ static SlangResult _parseVersion(UnownedStringSlice versionString, SemanticVersi /* static */ DownstreamCompilerMatchVersion WinVisualStudioUtil::getCompiledVersion() { +#ifdef _MSC_VER // Get the version of visual studio used to compile this source // Not const, because otherwise we get an warning/error about constant expression... uint32_t version = _MSC_VER; @@ -247,6 +248,7 @@ static SlangResult _parseVersion(UnownedStringSlice versionString, SemanticVersi SLANG_PASS_THROUGH_VISUAL_STUDIO, MatchSemanticVersion::makeFuture()); } +#endif // Unknown version return DownstreamCompilerMatchVersion(SLANG_PASS_THROUGH_VISUAL_STUDIO, MatchSemanticVersion()); |
