summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2016-10-25 12:59:15 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2016-10-25 12:59:15 +0000
commitbe1d49a508bdd2bbe43926418df5996a61f22406 (patch)
treec6d1cec1fc85a2572ce6e93dfa823c31e2e92206 /clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
parent4e325f77a9ad640206c9fb80c2bbf704f330f4d5 (diff)
downloadbcm5719-llvm-be1d49a508bdd2bbe43926418df5996a61f22406.tar.gz
bcm5719-llvm-be1d49a508bdd2bbe43926418df5996a61f22406.zip
Fix MSVC unused variable warning.
LLVM_ATTRIBUTE_UNUSED doesn't work for non-gcc style compilers. llvm-svn: 285067
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
index 2aa222ad248..5d7a14d3be1 100644
--- a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
+++ b/clang/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.
//
OpenPOWER on IntegriCloud