r198094 - Silence a dubious GCC warning about a set but unused global. Indeed, the
Chandler Carruth
chandlerc at gmail.com
Fri Dec 27 18:50:01 PST 2013
Author: chandlerc
Date: Fri Dec 27 20:50:00 2013
New Revision: 198094
URL: http://llvm.org/viewvc/llvm-project?rev=198094&view=rev
Log:
Silence a dubious GCC warning about a set but unused global. Indeed, the
purpose of this global is to be set and not used. =]
Modified:
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=198094&r1=198093&r2=198094&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Fri Dec 27 20:50:00 2013
@@ -1836,7 +1836,7 @@ void BuryPointer(const void *Ptr) {
// will not be properly buried and a leak detector will report a leak, which
// is what we want in such case.
static const size_t kGraveYardMaxSize = 16;
- static const void *GraveYard[kGraveYardMaxSize];
+ LLVM_ATTRIBUTE_UNUSED static const void *GraveYard[kGraveYardMaxSize];
static llvm::sys::cas_flag GraveYardSize;
llvm::sys::cas_flag Idx = llvm::sys::AtomicIncrement(&GraveYardSize) - 1;
if (Idx >= kGraveYardMaxSize)
More information about the cfe-commits
mailing list