From d255fae769f52baa3a1fcc5fd8453657a2031bdc Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 25 Oct 2016 12:59:15 +0000 Subject: [PATCH] Fix MSVC unused variable warning. LLVM_ATTRIBUTE_UNUSED doesn't work for non-gcc style compilers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285067 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp b/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp index 2aa222ad24..5d7a14d3be 100644 --- a/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp @@ -464,10 +464,11 @@ void StdLibraryFunctionsChecker::initFunctionSummaries( QualType SSizeTy = ACtx.getIntTypeForBitwidth(ACtx.getTypeSize(SizeTy), true); // Don't worry about truncation here, it'd be cast back to SIZE_MAX when used. - LLVM_ATTRIBUTE_UNUSED int64_t SizeMax = + int64_t SizeMax = BVF.getMaxValue(SizeTy).getLimitedValue(); int64_t SSizeMax = BVF.getMaxValue(SSizeTy).getLimitedValue(); + (void)SizeMax; // We are finally ready to define specifications for all supported functions. // -- 2.40.0