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

Fix two compiler warnings #178

Merged
merged 3 commits into from
Dec 13, 2023
Merged

Fix two compiler warnings #178

merged 3 commits into from
Dec 13, 2023

Conversation

jmcarcell
Copy link
Contributor

@jmcarcell jmcarcell commented Nov 26, 2023

BEGINRELEASENOTES

  • Bump the SIO version to v00-02
  • Fix two compiler warnings with clang

ENDRELEASENOTES

These are the warnings:

/LCIO/sio/src/api.cc:497:17: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
      rec_buf = std::move( device.take_buffer() ) ;
                ^
/LCIO/sio/src/api.cc:497:17: note: remove std::move call here
      rec_buf = std::move( device.take_buffer() ) ;
                ^~~~~~~~~~~                     ~~

/LCIO/src/cpp/include/IMPL/AccessChecked.h:25:13: warning: definition of implicit copy constructor for 'AccessChecked' is deprecated because it has a user-declared destructor [-Wdeprecated-copy-with-dtor]
    virtual ~AccessChecked() = default;
            ^
/LCIO/src/cpp/include/IMPL/TrackStateImpl.h:31:5: note: in implicit copy constructor for 'IMPL::AccessChecked' first required here
    TrackStateImpl(TrackStateImpl const&) = default ;
    ^
/LCIO/src/cpp/src/TESTS/test_trackstate.cc:85:24: note: in defaulted copy constructor for 'IMPL::TrackStateImpl' first required here
        TrackStateImpl c(b);

@tmadlener
Copy link
Contributor

This should be fixed in upstream sio as well I think.

@tmadlener
Copy link
Contributor

The warnings in the SIO sources have been fixed upstream and it should be enough to simply bump the SIO version to v00-02 here

LCIO/CMakeLists.txt

Lines 172 to 173 in 3687a34

GIT_REPOSITORY https://github.com/iLCSoft/SIO.git
GIT_TAG v00-01

@jmcarcell
Copy link
Contributor Author

The warnings in the SIO sources have been fixed upstream and it should be enough to simply bump the SIO version to v00-02 here

LCIO/CMakeLists.txt

Lines 172 to 173 in 3687a34

GIT_REPOSITORY https://github.com/iLCSoft/SIO.git
GIT_TAG v00-01

Done

Copy link
Contributor

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all warnings gone now? I.e. could we add -Werror to CI? We already have -Werror at least in some CI workflows. Guess we just don't have a workflow with clang.

@tmadlener tmadlener merged commit fafe8f6 into iLCSoft:master Dec 13, 2023
10 checks passed
@jmcarcell
Copy link
Contributor Author

Yep, I get no warnings with both gcc and clang

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 this pull request may close these issues.

2 participants