iLCSoft / LCIO

Linear Collider I/O
BSD 3-Clause "New" or "Revised" License
17 stars 34 forks source link

Fix two compiler warnings #178

Closed jmcarcell closed 6 months ago

jmcarcell commented 7 months ago

BEGINRELEASENOTES

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 commented 7 months ago

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

tmadlener commented 7 months ago

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

https://github.com/iLCSoft/LCIO/blob/3687a34c8328289c56debe46192f7249b442aafa/CMakeLists.txt#L172-L173

jmcarcell commented 6 months ago

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

https://github.com/iLCSoft/LCIO/blob/3687a34c8328289c56debe46192f7249b442aafa/CMakeLists.txt#L172-L173

Done

jmcarcell commented 6 months ago

Yep, I get no warnings with both gcc and clang