diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-12-20 16:57:52 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-12-20 16:57:52 +0100 |
commit | 03ee8f797ddf8ba4701e394998a28aa7ee5c7ffb (patch) | |
tree | 14583b1f345c851e14cf3b95d4a0a7f3fe8ae7b0 | |
parent | 5f2350251bddaa3be7fe2fbc510cf253e7fc971f (diff) |
Fix uninitialised warning.
-rw-r--r-- | lv2/input_lv2.h | 4 | ||||
-rw-r--r-- | src/drumkit.h | 4 | ||||
-rw-r--r-- | src/drumkitloader.h | 8 | ||||
-rw-r--r-- | src/instrumentparser.h | 8 | ||||
-rw-r--r-- | src/thread.h | 4 |
5 files changed, 14 insertions, 14 deletions
diff --git a/lv2/input_lv2.h b/lv2/input_lv2.h index 32e2fd8..3e3ef31 100644 --- a/lv2/input_lv2.h +++ b/lv2/input_lv2.h @@ -47,10 +47,10 @@ public: event_t *run(size_t pos, size_t len, size_t *nevents); void post(); - LV2_Atom_Sequence *eventPort; + LV2_Atom_Sequence *eventPort{nullptr}; private: - Instruments *instruments; + Instruments *instruments{nullptr}; }; #endif/*__DRUMGIZMO_INPUT_LV2_H__*/ diff --git a/src/drumkit.h b/src/drumkit.h index 04b2c56..a9ceb80 100644 --- a/src/drumkit.h +++ b/src/drumkit.h @@ -56,13 +56,13 @@ public: size_t samplerate(); private: - void *magic; + void *magic{nullptr}; std::string _file; std::string _name; std::string _description; - size_t _samplerate; + size_t _samplerate{0}; VersionStr _version; }; diff --git a/src/drumkitloader.h b/src/drumkitloader.h index 2c0ea8e..b4a0a69 100644 --- a/src/drumkitloader.h +++ b/src/drumkitloader.h @@ -89,11 +89,11 @@ private: Semaphore run_semaphore; Semaphore semaphore; Mutex mutex; - volatile bool running; + volatile bool running{false}; std::list<AudioFile*> load_queue; - size_t total_num_audiofiles; - size_t fraction; - size_t loaded; + size_t total_num_audiofiles{0}; + size_t fraction{1}; + size_t loaded{0}; }; #endif/*__DRUMGIZMO_DRUMKITLOADER_H__*/ diff --git a/src/instrumentparser.h b/src/instrumentparser.h index 2a7a9c9..60a6261 100644 --- a/src/instrumentparser.h +++ b/src/instrumentparser.h @@ -47,14 +47,14 @@ protected: int readData(char *data, size_t size); private: - FILE *fd; + FILE *fd{nullptr}; Instrument &instrument; - Sample *s; + Sample *s{nullptr}; std::string path; - level_t lower; - level_t upper; + level_t lower{0}; + level_t upper{0}; }; #endif/*__DRUMGIZMO_INSTRUMENTPARSER_H__*/ diff --git a/src/thread.h b/src/thread.h index f2c1dd0..33435e6 100644 --- a/src/thread.h +++ b/src/thread.h @@ -46,10 +46,10 @@ protected: private: #ifdef WIN32 - HANDLE tid; + HANDLE tid{nullptr}; static DWORD WINAPI #else - pthread_t tid; + pthread_t tid{0}; static void* #endif/*WIN32*/ thread_run(void *data); |