From: Simon Pilgrim Date: Tue, 25 Oct 2016 12:59:15 +0000 (+0000) Subject: Fix MSVC unused variable warning. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d255fae769f52baa3a1fcc5fd8453657a2031bdc;p=clang 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 --- 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. //