diff options
author | David Robillard <d@drobilla.net> | 2019-12-08 19:40:27 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-12-08 21:08:24 +0100 |
commit | 484665f577267dac4ccd722bc28239a73c6efdb4 (patch) | |
tree | 2213a1fc015c1e06e056ec081256b46042d38b87 /src/server | |
parent | 6f1277f261a0fed20af10a8ee5804ee694962550 (diff) | |
download | ingen-484665f577267dac4ccd722bc28239a73c6efdb4.tar.gz ingen-484665f577267dac4ccd722bc28239a73c6efdb4.tar.bz2 ingen-484665f577267dac4ccd722bc28239a73c6efdb4.zip |
Cleanup: Add missing explicit initialisations
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/ControlBindings.cpp | 1 | ||||
-rw-r--r-- | src/server/RunContext.cpp | 4 | ||||
-rw-r--r-- | src/server/SocketListener.cpp | 2 | ||||
-rw-r--r-- | src/server/UndoStack.cpp | 8 | ||||
-rw-r--r-- | src/server/Worker.cpp | 2 |
5 files changed, 10 insertions, 7 deletions
diff --git a/src/server/ControlBindings.cpp b/src/server/ControlBindings.cpp index f1380462..2e1f9d06 100644 --- a/src/server/ControlBindings.cpp +++ b/src/server/ControlBindings.cpp @@ -51,6 +51,7 @@ ControlBindings::ControlBindings(Engine& engine) engine.world().uris().atom_Sequence, 0, 4096)) // FIXME: capacity? + , _forge() { lv2_atom_forge_init( &_forge, &engine.world().uri_map().urid_map_feature()->urid_map); diff --git a/src/server/RunContext.cpp b/src/server/RunContext.cpp index 0eabb1ee..68812c02 100644 --- a/src/server/RunContext.cpp +++ b/src/server/RunContext.cpp @@ -66,6 +66,7 @@ RunContext::RunContext(Engine& engine, , _end(0) , _offset(0) , _nframes(0) + , _rate(0) , _realtime(true) {} @@ -79,6 +80,7 @@ RunContext::RunContext(const RunContext& copy) , _end(copy._end) , _offset(copy._offset) , _nframes(copy._nframes) + , _rate(copy._rate) , _realtime(copy._realtime) {} @@ -168,7 +170,7 @@ RunContext::set_priority(int priority) if (_thread) { pthread_t pthread = _thread->native_handle(); const int policy = (priority > 0) ? SCHED_FIFO : SCHED_OTHER; - sched_param sp; + sched_param sp{}; sp.sched_priority = (priority > 0) ? priority : 0; if (pthread_setschedparam(pthread, policy, &sp)) { _engine.log().error( diff --git a/src/server/SocketListener.cpp b/src/server/SocketListener.cpp index ecce1649..ac4b9f9e 100644 --- a/src/server/SocketListener.cpp +++ b/src/server/SocketListener.cpp @@ -46,7 +46,7 @@ static std::string get_link_target(const char* link_path) { // Stat the link to get the required size for the target path - struct stat link_stat; + struct stat link_stat{}; if (lstat(link_path, &link_stat)) { return std::string(); } diff --git a/src/server/UndoStack.cpp b/src/server/UndoStack.cpp index e04daa1a..9574d393 100644 --- a/src/server/UndoStack.cpp +++ b/src/server/UndoStack.cpp @@ -118,16 +118,16 @@ UndoStack::pop() } struct BlankIDs { - BlankIDs(char c='b') : n(0), c(c) {} + BlankIDs(char c='b') : c(c) {} SerdNode get() { snprintf(buf, sizeof(buf), "%c%u", c, n++); return serd_node_from_string(SERD_BLANK, USTR(buf)); } - char buf[16]; - unsigned n; - const char c; + char buf[16]{}; + unsigned n{0}; + const char c{'b'}; }; struct ListContext { diff --git a/src/server/Worker.cpp b/src/server/Worker.cpp index 1fd887d0..68926278 100644 --- a/src/server/Worker.cpp +++ b/src/server/Worker.cpp @@ -137,7 +137,7 @@ void Worker::run() { while (_sem.wait() && !_exit_flag) { - MessageHeader msg; + MessageHeader msg{}; if (_requests.read_space() > sizeof(msg)) { if (_requests.read(sizeof(msg), &msg) != sizeof(msg)) { _log.error("Error reading header from work request ring\n"); |