Author: rksimon
Date: Tue Oct 25 07:59:15 2016
New Revision: 285067

URL: http://llvm.org/viewvc/llvm-project?rev=285067&view=rev
Log:
Fix MSVC unused variable warning.

LLVM_ATTRIBUTE_UNUSED doesn't work for non-gcc style compilers.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp?rev=285067&r1=285066&r2=285067&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp 
(original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp Tue 
Oct 25 07:59:15 2016
@@ -464,10 +464,11 @@ void StdLibraryFunctionsChecker::initFun
   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.
   //


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to