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

Test warnings about signedness in comparisons in reco_particle_ref.cc #168

Closed
wdconinc opened this issue Aug 7, 2022 · 1 comment · Fixed by #174
Closed

Test warnings about signedness in comparisons in reco_particle_ref.cc #168

wdconinc opened this issue Aug 7, 2022 · 1 comment · Fixed by #174

Comments

@wdconinc
Copy link
Contributor

wdconinc commented Aug 7, 2022

#    - name: Build in LCG view
#      uses: aidasoft/run-lcg-view@v1
#      with:
#        release-platform: ${{ matrix.LCG }}
#        run: |

docker run --rm -it -v /cvmfs:/cvmfs:shared ghcr.io/aidasoft/ubuntu2004:latest /bin/bash
source /cvmfs/sft.cern.ch/lcg/views/LCG_101/x86_64-ubuntu2004-gcc9-opt/setup.sh
git clone https://github.com/AIDAsoft/podio
git clone https://github.com/key4hep/edm4hep

          # build podio
          cmake -B podio-build -S podio \
            -DCMAKE_INSTALL_PREFIX=podio-install \
            -DUSE_EXTERNAL_CATCH2=OFF
          make -C podio-build -j6 install
          
          # build EDM4HEP
          export PODIO=$PWD/podio-install
          unset CMAKE_PREFIX_PATH
          cmake -B edm4hep-build -S edm4hep \
            -DCMAKE_INSTALL_PREFIX=edm4hep-install \
            -DUSE_EXTERNAL_CATCH2=OFF
          make -C edm4hep-build -j6 install

This returns (only) the following compilation warnings (in addition to the issue in #167):

/edm4hep/test/reco_particle_ref.cc: In function 'void writeRecoParticleRef(const TestState&)':
/edm4hep/test/reco_particle_ref.cc:31:25: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'const value_type' {aka 'const int'} [-Wsign-compare]
   31 |   ASSERT_CONDITION(left == right, msg.str())                              \
/edm4hep/test/reco_particle_ref.cc:22:10: note: in definition of macro 'ASSERT_CONDITION'
   22 |   if ( !(condition) ) {                                                      \
      |          ^~~~~~~~~
/edm4hep/test/reco_particle_ref.cc:133:5: note: in expansion of macro 'ASSERT_EQUAL'
  133 |     ASSERT_EQUAL(recoColl.size(), testState.nEntries[iEvent], "Created wrong number of entries");
      |     ^~~~~~~~~~~~
/edm4hep/test/reco_particle_ref.cc:31:25: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'const value_type' {aka 'const int'} [-Wsign-compare]
   31 |   ASSERT_CONDITION(left == right, msg.str())                              \
/edm4hep/test/reco_particle_ref.cc:22:10: note: in definition of macro 'ASSERT_CONDITION'
   22 |   if ( !(condition) ) {                                                      \
      |          ^~~~~~~~~
/edm4hep/test/reco_particle_ref.cc:134:5: note: in expansion of macro 'ASSERT_EQUAL'
  134 |     ASSERT_EQUAL(refColl.size(), testState.nRefs[iEvent], "Created wrong number of references");
      |     ^~~~~~~~~~~~
/edm4hep/test/reco_particle_ref.cc: In function 'void readRecoParticleRef(const TestState&)':
/edm4hep/test/reco_particle_ref.cc:31:25: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'const value_type' {aka 'const int'} [-Wsign-compare]
   31 |   ASSERT_CONDITION(left == right, msg.str())                              \
/edm4hep/test/reco_particle_ref.cc:22:10: note: in definition of macro 'ASSERT_CONDITION'
   22 |   if ( !(condition) ) {                                                      \
      |          ^~~~~~~~~
/edm4hep/test/reco_particle_ref.cc:159:5: note: in expansion of macro 'ASSERT_EQUAL'
  159 |     ASSERT_EQUAL(recoColl.size(), testState.nEntries[iEvent],
      |     ^~~~~~~~~~~~
/edm4hep/test/reco_particle_ref.cc:31:25: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'const value_type' {aka 'const int'} [-Wsign-compare]
   31 |   ASSERT_CONDITION(left == right, msg.str())                              \
/edm4hep/test/reco_particle_ref.cc:22:10: note: in definition of macro 'ASSERT_CONDITION'
   22 |   if ( !(condition) ) {                                                      \
      |          ^~~~~~~~~
/edm4hep/test/reco_particle_ref.cc:164:5: note: in expansion of macro 'ASSERT_EQUAL'
  164 |     ASSERT_EQUAL(refColl.size(), testState.nRefs[iEvent],
      |     ^~~~~~~~~~~~
@tmadlener
Copy link
Contributor

Related: #123

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

Successfully merging a pull request may close this issue.

2 participants