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

Tidy some compiler warnings #338

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions RtMidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ void MidiInCore :: openPort( unsigned int portNumber, const std::string &portNam
}

CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
unsigned int nSrc = MIDIGetNumberOfSources();
auto nSrc = MIDIGetNumberOfSources();
if ( nSrc < 1 ) {
errorString_ = "MidiInCore::openPort: no MIDI input sources found!";
error( RtMidiError::NO_DEVICES_FOUND, errorString_ );
Expand Down Expand Up @@ -1309,7 +1309,7 @@ void MidiInCore :: setPortName ( const std::string& )
unsigned int MidiInCore :: getPortCount()
{
CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
return MIDIGetNumberOfSources();
return static_cast<unsigned int> (MIDIGetNumberOfSources());
}

// This function was submitted by Douglas Casey Tucker and apparently
Expand Down Expand Up @@ -1397,7 +1397,7 @@ static CFStringRef CreateConnectedEndpointName( MIDIEndpointRef endpoint )

// Does the endpoint have connections?
CFDataRef connections = NULL;
int nConnected = 0;
size_t nConnected = 0;
bool anyStrings = false;
err = MIDIObjectGetDataProperty( endpoint, kMIDIPropertyConnectionUniqueID, &connections );
if ( connections != NULL ) {
Expand Down Expand Up @@ -1528,7 +1528,7 @@ void MidiOutCore :: initialize( const std::string& clientName )
unsigned int MidiOutCore :: getPortCount()
{
CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
return MIDIGetNumberOfDestinations();
return static_cast<unsigned int> (MIDIGetNumberOfDestinations());
}

std::string MidiOutCore :: getPortName( unsigned int portNumber )
Expand Down Expand Up @@ -1564,7 +1564,7 @@ void MidiOutCore :: openPort( unsigned int portNumber, const std::string &portNa
}

CFRunLoopRunInMode( kCFRunLoopDefaultMode, 0, false );
unsigned int nDest = MIDIGetNumberOfDestinations();
auto nDest = MIDIGetNumberOfDestinations();
if (nDest < 1) {
errorString_ = "MidiOutCore::openPort: no MIDI output destinations found!";
error( RtMidiError::NO_DEVICES_FOUND, errorString_ );
Expand Down Expand Up @@ -5059,7 +5059,7 @@ unsigned int MidiInAndroid :: getPortCount() {
return androidMidiDevices.size();
}

std::string MidiInAndroid :: getPortName(unsigned int portNumber) {
std::string MidiInAndroid :: getPortName(unsigned int portNumber) {
auto env = androidGetThreadEnv();
return androidPortName(env, portNumber);
}
Expand Down
Loading