diff --git a/src/config.c b/src/config.c
index 7f1b3ada29f604d5212325d8e3343933aefe045b..5f38652124035e25394f1c393e99d42a4c6428ac 100644
--- a/src/config.c
+++ b/src/config.c
@@ -15,7 +15,7 @@
 #include <sys/stat.h>
 #include <limits.h>
 
-static inline int
+int
 load_so(const char *const mod_path, const char *const mod_init, void *mod)
 {
     /* An init function takes two arguments: the module pointer and a void*
diff --git a/src/database/playlist.c b/src/database/playlist.c
index 086f580bd911e19526e4bb4ad3b248e918995323..970fb0fd06edbd69b6c3937e4bbf6091813d9be6 100644
--- a/src/database/playlist.c
+++ b/src/database/playlist.c
@@ -99,7 +99,7 @@ database_plt_export(sqlite3 *db, const char *name)
         "( kara_id INTEGER PRIMARY KEY NOT NULL CHECK(kara_id > 0) );";
     char SQL_STMT[LKT_MAX_SQLITE_STATEMENT];
     int code, ret = false;
-    sqlite3_stmt *stmt;
+    sqlite3_stmt *stmt = NULL;
 
     if (is_sql_str_invalid(name)) {
         LOG_ERROR("The playlist name '%s' is invalid", name);
diff --git a/src/database/queue.c b/src/database/queue.c
index 341455f016c363839f23ba996643ef70a84ef045..515d46b92a4fb07e7c7449e436b9084fed23d366 100644
--- a/src/database/queue.c
+++ b/src/database/queue.c
@@ -643,7 +643,7 @@ bool
 database_queue_seekid(sqlite3 *db, int id, int *out_pos)
 {
     static const char *SQL_STMT = "SELECT position FROM queue_ WHERE kara_id = ? LIMIT 1";
-    int ret;
+    int ret = 0;
     sqlite3_stmt *stmt;
 
     SQLITE_PREPARE(db, stmt, SQL_STMT, error);
diff --git a/src/net/downloader.c b/src/net/downloader.c
index 76a9307a49ae7d002b7962c781e0b721d1a2f040..96abec51a631caf426e3a7b6593d4ccfa285a93b 100644
--- a/src/net/downloader.c
+++ b/src/net/downloader.c
@@ -28,7 +28,7 @@ struct file {
     int fd;
 };
 
-static size_t
+size_t
 write_mem__(char *data, size_t size, size_t nmem, void *user)
 {
     size_t realsize = size * nmem;
@@ -43,7 +43,7 @@ write_mem__(char *data, size_t size, size_t nmem, void *user)
     return realsize;
 }
 
-static size_t
+size_t
 write_disk__(char *data, size_t size, size_t nmem, void *user)
 {
     ssize_t realsize = size * nmem;
@@ -87,7 +87,8 @@ repo_free(struct lkt_repo *const repo)
     if (!curl_init)
         curl_global_cleanup();
 }
-static inline int
+
+int
 safe_json_get_string(struct json_object *jobj, const char *key, char *content, const size_t len)
 {
     const char *got;
@@ -100,7 +101,7 @@ safe_json_get_string(struct json_object *jobj, const char *key, char *content, c
     return 0;
 }
 
-static inline int
+int
 safe_json_get_int32(struct json_object *json, const char *key, int32_t *ret)
 {
     struct json_object *field;
@@ -111,7 +112,7 @@ safe_json_get_int32(struct json_object *json, const char *key, int32_t *ret)
     return 0;
 }
 
-static inline long
+long
 get_digit_number(long i)
 {
     int count = 0;
@@ -133,7 +134,7 @@ safe_json_get_long(struct json_object *json, const char *key, long *ret)
     return err;
 }
 
-static inline int
+int
 __json_sync(struct lkt_repo *const repo, struct json_object **json)
 {
     RETURN_UNLESS(json, "Invalid argument", 1);
@@ -245,7 +246,7 @@ err:
     return ret;
 }
 
-static inline int
+int
 __download_kara(const char *url, const char *path, int override)
 {
     CURL *curl_handle;
@@ -333,7 +334,7 @@ repo_download_id_sync(struct lkt_repo *const repo, const uint64_t id, const char
 
 /* Get all the kara, make them unavailable */
 
-static inline void
+void
 __handle_got_json(volatile sqlite3 *db, struct lkt_repo *repo, struct json_object *json)
 {
     size_t i, len = json_object_array_length(json);
@@ -419,7 +420,7 @@ err:
     free(kara);
 }
 
-static inline void *
+void *
 __repo_get_all_id_async(void *arg)
 {
     struct json_object *json;
@@ -434,7 +435,7 @@ __repo_get_all_id_async(void *arg)
     return NULL;
 }
 
-inline int
+int
 repo_update(struct lkt_repo *const repo)
 {
     return mthread_create(NULL, ATTR_DETACHED, __repo_get_all_id_async, repo);
diff --git a/src/net/listen.c b/src/net/listen.c
index 690c1844c6111d77864a47a7a01d5fd648c59a14..ce535c8e88297dd739edf452c13a70292fe68404 100644
--- a/src/net/listen.c
+++ b/src/net/listen.c
@@ -147,7 +147,7 @@ command_list_begin(struct lkt_state *srv, size_t c, int list_ok)
 static int
 handle_simple_command(struct lkt_state *srv, size_t c, struct lkt_command cmd)
 {
-    int err, continuation = 0;
+    int err = 0, continuation = 0;
 
     switch (*lkt_client_get_mask(srv, c)) {
     case MPD_IDLE_NONE:
diff --git a/src/thread.c b/src/thread.c
index e4e3f1074945c1cae565f986c7d74efb1439bfc8..8df3d086884a4795827181d716db04b89aa6fef0 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -15,7 +15,7 @@ struct __args {
     struct poller_thread_arg *arg;
 };
 
-static void *
+void *
 __start(void *args__)
 {
     struct __args *args = (struct __args *) args__;
@@ -92,7 +92,7 @@ poller_join(struct poller_thread *th, void **ret)
     return sta;
 }
 
-static inline int
+int
 th_append(unsigned int *len, unsigned int *size, void ***cells,
           pthread_mutex_t *lock, void *ptr)
 {
@@ -121,7 +121,7 @@ end:
     return ret;
 }
 
-static inline int
+int
 th_pop(unsigned int *len, void **cells, pthread_mutex_t *lock, void **ptr)
 {
     int ret = 1;
@@ -139,7 +139,7 @@ end:
     return ret;
 }
 
-static inline int
+int
 th_head(unsigned int len, void **cells, pthread_mutex_t *lock, void **ptr)
 {
     int ret = 1;