Skip to content

Commit

Permalink
Merge pull request #5658 from gartung/clangSA-squelch-checker-warnings
Browse files Browse the repository at this point in the history
Static Analyzer -- squelch static analyzer warnings for StaticAnalyzer package
  • Loading branch information
nclopezo committed Oct 3, 2014
2 parents ac478c7 + 04cf35f commit aa34db5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Utilities/StaticAnalyzers/src/CmsSupport.cpp
Expand Up @@ -27,12 +27,11 @@ using namespace clang;
using namespace llvm;
bool support::isCmsLocalFile(const char* file)
{
static char* LocalDir=0;
static int DirLen=-1;
static const char* LocalDir= std::getenv("LOCALRT");
[[cms::thread_safe]] static int DirLen=-1;
if (DirLen==-1)
{
DirLen=0;
LocalDir = getenv ("LOCALRT");
if (LocalDir!=NULL) DirLen=strlen(LocalDir);
}
if ((DirLen==0) || (strncmp(file,LocalDir,DirLen)!=0) || (strncmp(&file[DirLen],"/src/",5)!=0)) return false;
Expand Down Expand Up @@ -122,7 +121,7 @@ bool support::isSafeClassName(const std::string &cname) {
}

bool support::isDataClass(const std::string & name) {
static std::string iname("");
[[cms::thread_safe]] static std::string iname("");
if ( iname == "") {
clang::FileSystemOptions FSO;
clang::FileManager FM(FSO);
Expand All @@ -147,7 +146,7 @@ bool support::isDataClass(const std::string & name) {
iname = fname2;
}

static scaling_bloom_t * blmflt = new_scaling_bloom_from_file( CAPACITY, ERROR_RATE, iname.c_str() );
[[cms::thread_safe]] static scaling_bloom_t * blmflt = new_scaling_bloom_from_file( CAPACITY, ERROR_RATE, iname.c_str() );

if ( scaling_bloom_check( blmflt, name.c_str(), name.length() ) == 1 ) return true;

Expand Down

0 comments on commit aa34db5

Please sign in to comment.