summaryrefslogtreecommitdiffstats
path: root/src/JackDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-27 17:57:40 +0100
committerDavid Robillard <d@drobilla.net>2020-11-27 21:42:51 +0100
commite398029f74d6be188829032f5f4d8a8a9e2fb3f9 (patch)
tree7685185b92290e8d61462d7e9f3d4ddea134c10b /src/JackDriver.cpp
parent6342c9cfa934b356b6903be030ce2667c4e5b829 (diff)
downloadpatchage-e398029f74d6be188829032f5f4d8a8a9e2fb3f9.tar.gz
patchage-e398029f74d6be188829032f5f4d8a8a9e2fb3f9.tar.bz2
patchage-e398029f74d6be188829032f5f4d8a8a9e2fb3f9.zip
Always initialize variables
Diffstat (limited to 'src/JackDriver.cpp')
-rw-r--r--src/JackDriver.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp
index 7f3402c..556ef73 100644
--- a/src/JackDriver.cpp
+++ b/src/JackDriver.cpp
@@ -218,8 +218,8 @@ JackDriver::create_port(PatchageModule& parent, jack_port_t* port, PortID id)
}
#endif
- const char* const type_str = jack_port_type(port);
- PortType port_type;
+ const char* const type_str = jack_port_type(port);
+ PortType port_type = JACK_AUDIO;
if (!strcmp(type_str, JACK_DEFAULT_AUDIO_TYPE)) {
port_type = JACK_AUDIO;
#ifdef HAVE_JACK_METADATA
@@ -269,8 +269,8 @@ JackDriver::shutdown()
void
JackDriver::refresh()
{
- const char** ports;
- jack_port_t* port;
+ const char** ports = nullptr;
+ jack_port_t* port = nullptr;
// Jack can take _client away from us at any time throughout here :/
// Shortest locks possible is the best solution I can figure out
@@ -293,7 +293,7 @@ JackDriver::refresh()
std::string port1_name;
std::string client2_name;
std::string port2_name;
- size_t colon;
+ size_t colon = std::string::npos;
// Add all ports
for (int i = 0; ports[i]; ++i) {