From: Jordy Rose Date: Tue, 8 May 2012 03:27:22 +0000 (+0000) Subject: Clean up SemaDeclAttr for high-warnings build. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fad5de9d674521017460f8445e2f81e2a1086290;p=clang Clean up SemaDeclAttr for high-warnings build. Includes a real potential initialization problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156363 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index eb26a98f55..223e517c1f 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -300,8 +300,8 @@ static const RecordType *getRecordType(QualType QT) { } -bool checkBaseClassIsLockableCallback(const CXXBaseSpecifier *Specifier, - CXXBasePath &Path, void *UserData) { +static bool checkBaseClassIsLockableCallback(const CXXBaseSpecifier *Specifier, + CXXBasePath &Path, void *Unused) { const RecordType *RT = Specifier->getType()->getAs(); if (RT->getDecl()->getAttr()) return true; @@ -1690,11 +1690,11 @@ static void handleObjCRequiresPropertyDefsAttr(Sema &S, Decl *D, Attr.getRange(), S.Context)); } -bool checkAvailabilityAttr(Sema &S, SourceRange Range, - IdentifierInfo *Platform, - VersionTuple Introduced, - VersionTuple Deprecated, - VersionTuple Obsoleted) { +static bool checkAvailabilityAttr(Sema &S, SourceRange Range, + IdentifierInfo *Platform, + VersionTuple Introduced, + VersionTuple Deprecated, + VersionTuple Obsoleted) { StringRef PlatformName = AvailabilityAttr::getPrettyPlatformName(Platform->getName()); if (PlatformName.empty()) @@ -1868,7 +1868,7 @@ static void handleVisibilityAttr(Sema &S, Decl *D, const AttributeList &Attr) { } // Find the last Decl that has an attribute. - VisibilityAttr *PrevAttr; + VisibilityAttr *PrevAttr = 0; assert(D->redecls_begin() == D); for (Decl::redecl_iterator I = D->redecls_begin(), E = D->redecls_end(); I != E; ++I) {