Skip to content

Commit

Permalink
clang check IgTools
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlange6 committed Oct 7, 2017
1 parent 5349f79 commit 2ac7431
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions IgTools/IgProf/plugins/IgProfModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class IgProfModule : public edm::EDAnalyzer
{
public:
IgProfModule(const edm::ParameterSet &ps)
: dump_(0),
: dump_(nullptr),
prescale_(0),
nrecord_(0),
nevent_(0),
Expand All @@ -35,7 +35,7 @@ class IgProfModule : public edm::EDAnalyzer
// since the suggested decision seems to be that the syntax should
// actually be "Conditionally-Supported Behavior" in some
// future C++ standard I simply silence the warning.
if (void *sym = dlsym(0, "igprof_dump_now"))
if (void *sym = dlsym(nullptr, "igprof_dump_now"))
dump_ = __extension__ (void(*)(const char *)) sym;
else
edm::LogWarning("IgProfModule")
Expand All @@ -51,32 +51,32 @@ class IgProfModule : public edm::EDAnalyzer
atEvent_ = ps.getUntrackedParameter<std::string>("reportToFileAtEvent", atEvent_);
}

virtual void beginJob() override
void beginJob() override
{ makeDump(atBeginJob_); }

virtual void endJob(void) override
void endJob(void) override
{ makeDump(atEndJob_); }

virtual void analyze(const edm::Event &e, const edm::EventSetup &) override
void analyze(const edm::Event &e, const edm::EventSetup &) override
{
nevent_ = e.id().event();
if (prescale_ > 0 && (++nrecord_ % prescale_) == 1)
makeDump(atEvent_);
}

virtual void beginRun(const edm::Run &r, const edm::EventSetup &) override
void beginRun(const edm::Run &r, const edm::EventSetup &) override
{ nrun_ = r.run(); makeDump(atBeginRun_); }

virtual void endRun(const edm::Run &, const edm::EventSetup &) override
void endRun(const edm::Run &, const edm::EventSetup &) override
{ makeDump(atEndRun_); }

virtual void beginLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &) override
void beginLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &) override
{ nlumi_ = l.luminosityBlock(); makeDump(atBeginLumi_); }

virtual void endLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &) override
void endLuminosityBlock(const edm::LuminosityBlock &l, const edm::EventSetup &) override
{ makeDump(atEndLumi_); }

virtual void respondToOpenInputFile(const edm::FileBlock &) override
void respondToOpenInputFile(const edm::FileBlock &) override
{ ++nfile_; makeDump(atInputFile_); }

private:
Expand Down
4 changes: 2 additions & 2 deletions IgTools/IgProf/plugins/IgProfService.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ using namespace edm::service;

IgProfService::IgProfService(ParameterSet const& ps,
ActivityRegistry&iRegistry)
: dump_(0),
: dump_(nullptr),
mineventrecord_(1),
prescale_(1),
nrecord_(0),
Expand All @@ -44,7 +44,7 @@ IgProfService::IgProfService(ParameterSet const& ps,
// since the suggested decision seems to be that the syntax should
// actually be "Conditionally-Supported Behavior" in some
// future C++ standard I simply silence the warning.
if (void *sym = dlsym(0, "igprof_dump_now")) {
if (void *sym = dlsym(nullptr, "igprof_dump_now")) {
dump_ = __extension__ (void(*)(const char *)) sym;
} else
edm::LogWarning("IgProfModule")
Expand Down

0 comments on commit 2ac7431

Please sign in to comment.