celtera / libremidi

A modern C++ MIDI 1 / MIDI 2 real-time & file I/O library. Supports Windows, macOS, Linux and WebMIDI.
Other
463 stars 51 forks source link

alsa_raw compiler warning `-Wsubobject-linkage` #80

Closed Holzhaus closed 1 year ago

Holzhaus commented 1 year ago

I'm getting the following warning when building on Linux with GNU GCC 13.2.1:

In file included from /home/jan/Projects/libremidi/include/libremidi/backends/alsa_raw.hpp:4,
                 from /home/jan/Projects/libremidi/include/libremidi/backends.hpp:16,
                 from /home/jan/Projects/libremidi/include/libremidi/observer.cpp:5:
/home/jan/Projects/libremidi/include/libremidi/backends/alsa_raw/observer.hpp:16:7: warning: ‘libremidi::alsa_raw::observer_impl’ has a field ‘libremidi::{anonymous}::alsa_raw_helpers::enumerator libremidi::alsa_raw::observer_impl::current_devices’ whose type uses the anonymous namespace [-Wsubobject-linkage]
   16 | class observer_impl : public observer_api
      |       ^~~~~~~~~~~~~
In file included from /home/jan/Projects/libremidi/include/libremidi/backends/alsa_raw.hpp:4,
                 from /home/jan/Projects/libremidi/include/libremidi/backends.hpp:16,
                 from /home/jan/Projects/libremidi/include/libremidi/midi_out.cpp:5:
/home/jan/Projects/libremidi/include/libremidi/backends/alsa_raw/observer.hpp:16:7: warning: ‘libremidi::alsa_raw::observer_impl’ has a field ‘libremidi::{anonymous}::alsa_raw_helpers::enumerator libremidi::alsa_raw::observer_impl::current_devices’ whose type uses the anonymous namespace [-Wsubobject-linkage]
   16 | class observer_impl : public observer_api
      |       ^~~~~~~~~~~~~
In file included from /home/jan/Projects/libremidi/include/libremidi/backends/alsa_raw.hpp:4,
                 from /home/jan/Projects/libremidi/include/libremidi/backends.hpp:16,
                 from /home/jan/Projects/libremidi/include/libremidi/midi_in.cpp:5:
/home/jan/Projects/libremidi/include/libremidi/backends/alsa_raw/observer.hpp:16:7: warning: ‘libremidi::alsa_raw::observer_impl’ has a field ‘libremidi::{anonymous}::alsa_raw_helpers::enumerator libremidi::alsa_raw::observer_impl::current_devices’ whose type uses the anonymous namespace [-Wsubobject-linkage]
   16 | class observer_impl : public observer_api
      |       ^~~~~~~~~~~~~
In file included from /home/jan/Projects/libremidi/include/libremidi/backends/alsa_raw.hpp:4,
                 from /home/jan/Projects/libremidi/include/libremidi/backends.hpp:16,
                 from /home/jan/Projects/libremidi/include/libremidi/libremidi.cpp:5:
/home/jan/Projects/libremidi/include/libremidi/backends/alsa_raw/observer.hpp:16:7: warning: ‘libremidi::alsa_raw::observer_impl’ has a field ‘libremidi::{anonymous}::alsa_raw_helpers::enumerator libremidi::alsa_raw::observer_impl::current_devices’ whose type uses the anonymous namespace [-Wsubobject-linkage]
   16 | class observer_impl : public observer_api
      |       ^~~~~~~~~~~~~
In file included from /home/jan/Projects/libremidi/include/libremidi/backends/alsa_raw.hpp:4,
                 from /home/jan/Projects/libremidi/include/libremidi/backends.hpp:16,
                 from /home/jan/Projects/libremidi/include/libremidi/client.cpp:4:
/home/jan/Projects/libremidi/include/libremidi/backends/alsa_raw/observer.hpp:16:7: warning: ‘libremidi::alsa_raw::observer_impl’ has a field ‘libremidi::{anonymous}::alsa_raw_helpers::enumerator libremidi::alsa_raw::observer_impl::current_devices’ whose type uses the anonymous namespace [-Wsubobject-linkage]
   16 | class observer_impl : public observer_api
      |       ^~~~~~~~~~~~~