iLCSoft / SIO

Simple IO package
BSD 3-Clause "New" or "Revised" License
0 stars 9 forks source link

Compilation warnings (clang) #10

Closed gaede closed 3 years ago

gaede commented 4 years ago

There are compilation warnings with

In file included from /usr/local/ilcsoft/sio/v00-00-03/source/include/sio/api.h:360:
/usr/local/ilcsoft/sio/v00-00-03/source/include/sio/io_device.h:164:5: warning: explicitly defaulted copy constructor is implicitly deleted [-Wdefaulted-function-deleted]
    write_device( const write_device & ) = default ;
    ^
/usr/local/ilcsoft/sio/v00-00-03/source/include/sio/io_device.h:268:25: note: copy constructor of 'write_device' is implicitly deleted because field '_buffer' has a deleted copy constructor
    buffer              _buffer ;
                        ^
/usr/local/ilcsoft/sio/v00-00-03/source/include/sio/buffer.h:223:5: note: 'buffer' has been explicitly marked deleted here
    buffer( const buffer& ) = delete ;
    ^
In file included from /usr/local/ilcsoft/sio/v00-00-03/source/main/sio-dump.cc:4:
In file included from /usr/local/ilcsoft/sio/v00-00-03/source/include/sio/api.h:360:
/usr/local/ilcsoft/sio/v00-00-03/source/include/sio/io_device.h:168:19: warning: explicitly defaulted copy assignment operator is implicitly deleted [-Wdefaulted-function-deleted]
    write_device& operator=( const write_device & ) = default ;
                  ^
/usr/local/ilcsoft/sio/v00-00-03/source/include/sio/io_device.h:268:25: note: copy assignment operator of 'write_device' is implicitly deleted because field '_buffer' has a deleted copy assignment operator
    buffer              _buffer ;
                        ^
/usr/local/ilcsoft/sio/v00-00-03/source/include/sio/buffer.h:225:13: note: 'operator=' has been explicitly marked deleted here
    buffer& operator=( const buffer& ) = delete ;
            ^
In file included from /usr/local/ilcsoft/sio/v00-00-03/source/main/sio-dump.cc:4:
/usr/local/ilcsoft/sio/v00-00-03/source/include/sio/api.h:472:17: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
      rec_buf = std::move( device.take_buffer() ) ;
                ^
/usr/local/ilcsoft/sio/v00-00-03/source/include/sio/api.h:472:17: note: remove std::move call here
      rec_buf = std::move( device.take_buffer() ) ;
                ^~~~~~~~~~~                     ~~
3 warnings generated.