Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning of HGCal-related code from static check #37585

Open
srimanob opened this issue Apr 15, 2022 · 3 comments
Open

Warning of HGCal-related code from static check #37585

srimanob opened this issue Apr 15, 2022 · 3 comments

Comments

@srimanob
Copy link
Contributor

Following up of #37566, there are still warnings of static code check from HGCal-related code. This issue is to keep track of it until fix comes.

>> Compiling LCG dictionary: tmp/slc7_amd64_gcc10/src/Validation/HGCalValidation/src/ValidationHGCalValidation/a/ValidationHGCalValidation_xr.cc
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_4_X_2022-04-14-2300/src/L1Trigger/L1THGCal/src/backend/HGCalClusteringImpl.cc:87:26: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch]
    if (targetClu < 0 && isSeed[itc])
                         ^~~~~~~~~~~
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_4_X_2022-04-14-2300/src/L1Trigger/L1THGCal/src/backend/HGCalClusteringImpl.cc:301:9: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch]
    if (isSeed[itc])
        ^~~~~~~~~~~
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_4_X_2022-04-14-2300/src/L1Trigger/L1THGCal/src/backend/HGCalClusteringImpl.cc:392:9: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch]
    if (toRemove[i])
        ^~~~~~~~~~~
3 warnings generated.
In file included from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_4_X_2022-04-14-2300/src/Validation/HGCalValidation/plugins/SimG4HGCalValidation.cc:36:
In file included from /cvmfs/cms-ib.cern.ch/nweek-02728/slc7_amd64_gcc10/external/geant4/10.7.2-6392ec047a27d4a9d3c1479dfa959b9e/include/Geant4/G4Step.hh:53:
In file included from /cvmfs/cms-ib.cern.ch/nweek-02728/slc7_amd64_gcc10/external/geant4/10.7.2-6392ec047a27d4a9d3c1479dfa959b9e/include/Geant4/G4StepPoint.hh:48:
In file included from /cvmfs/cms-ib.cern.ch/nweek-02728/slc7_amd64_gcc10/external/geant4/10.7.2-6392ec047a27d4a9d3c1479dfa959b9e/include/Geant4/G4Material.hh:106:
In file included from /cvmfs/cms-ib.cern.ch/nweek-02728/slc7_amd64_gcc10/external/geant4/10.7.2-6392ec047a27d4a9d3c1479dfa959b9e/include/Geant4/G4SandiaTable.hh:51:
In file included from /cvmfs/cms-ib.cern.ch/nweek-02728/slc7_amd64_gcc10/external/geant4/10.7.2-6392ec047a27d4a9d3c1479dfa959b9e/include/Geant4/G4OrderedTable.hh:40:
In file included from /cvmfs/cms-ib.cern.ch/nweek-02728/slc7_amd64_gcc10/external/geant4/10.7.2-6392ec047a27d4a9d3c1479dfa959b9e/include/Geant4/G4DataVector.hh:97:
/cvmfs/cms-ib.cern.ch/nweek-02728/slc7_amd64_gcc10/external/geant4/10.7.2-6392ec047a27d4a9d3c1479dfa959b9e/include/Geant4/G4DataVector.icc:59:11: warning: Although the value stored to 'ptn' is used in the enclosing expression, the value is never actually read from 'ptn' [deadcode.DeadStores]
  return (ptn = ~(std::size_t) 0);
          ^     ~~~~~~~~~~~~~~~~
1 warning generated.
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_4_X_2022-04-14-2300/src/Validation/HGCalValidation/plugins/TICLTrackstersEdgesValidation.cc:74:3: warning: Mutable member 'rhtools_' in class 'TICLTrackstersEdgesValidation', might be thread-unsafe when accessing via a const pointer [threadsafety.MutableMember]
  mutable hgcal::RecHitTools rhtools_;
  ^
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_4_X_2022-04-14-2300/src/Validation/HGCalValidation/plugins/TICLTrackstersEdgesValidation.cc:226:3: warning: Non-const variable 'const char *[8] particle_kind' is static local or static member data and might be thread-unsafe [threadsafety.StaticLocal]
  static const char* particle_kind[] = {
  ^
2 warnings generated.
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_4_X_2022-04-14-2300/src/Validation/HGCalValidation/plugins/HGCalWaferValidation.cc:225:3: warning: Non-const variable 'int waferLayer' is static local or static member data and might be thread-unsafe [threadsafety.StaticLocal]
  static int waferLayer = 0;  // layer numbers in DD are assumed to be sequential from 1
  ^
1 warning generated.
@cmsbuild
Copy link
Contributor

A new Issue was created by @srimanob Phat Srimanobhas.

@Dr15Jones, @perrotta, @dpiparo, @makortel, @smuzaffar, @qliphy can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel
Copy link
Contributor

assign dqm, upgrade

@cms-sw/hgcal-dpg-l2

@cmsbuild
Copy link
Contributor

New categories assigned: dqm,upgrade

@jfernan2,@ahmad3213,@AdrianoDee,@micsucmed,@rvenditti,@emanueleusai,@srimanob,@pmandrik you have been requested to review this Pull request/Issue and eventually sign? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants