Skip to content

jack_port_set_name is deprecated #368

@alexdrymonitis

Description

@alexdrymonitis

I'm using ofxMidi, which uses RtMidi, and when I compile my project I get the following warning messages:

../../../addons/ofxMidi/libs/rtmidi/RtMidi.cpp: In member function ‘virtual void MidiInJack::setPortName(const std::string&)’:
../../../addons/ofxMidi/libs/rtmidi/RtMidi.cpp:4262:21: warning: ‘int jack_port_set_name(jack_port_t*, const char*)’ is deprecated [-Wdeprecated-declarations]
 4262 |   jack_port_set_name( data->port, portName.c_str() );
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../addons/ofxMidi/libs/rtmidi/RtMidi.cpp:3985:
/usr/include/jack/jack.h:901:5: note: declared here
  901 | int jack_port_set_name (jack_port_t *port, const char *port_name) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;
      |     ^~~~~~~~~~~~~~~~~~
../../../addons/ofxMidi/libs/rtmidi/RtMidi.cpp: In member function ‘virtual void MidiOutJack::setPortName(const std::string&)’:
../../../addons/ofxMidi/libs/rtmidi/RtMidi.cpp:4493:21: warning: ‘int jack_port_set_name(jack_port_t*, const char*)’ is deprecated [-Wdeprecated-declarations]
 4493 |   jack_port_set_name( data->port, portName.c_str() );
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/jack/jack.h:901:5: note: declared here
  901 | int jack_port_set_name (jack_port_t *port, const char *port_name) JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT;

I first created an issue in ofxMidi's repository, but was told that it uses the latest RtMidi and that I should create an issue here.
My OS is Debian 13 and jackd --version returns:

jackdmp version 1.9.22 tmpdir /dev/shm protocol 9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions