1--- a/core/config_reader.c
2+++ b/core/config_reader.c
3@@ -17,7 +17,7 @@
4 #include "../directories.h"
5 #include "macros.h"
6 #include <errno.h>
7-
8+#include <stdlib.h>
9 /*
10 * These variables are used to read the configuration.
11 */
12@@ -1355,7 +1355,7 @@
13 char file_path[PATH_MAX];
14
15 snprintf(file_path, sizeof(file_path), "%s%s%s%s", gimx_params.homedir, GIMX_DIR, CONFIG_DIR, file);
16-
17+ snprintf(file_path, sizeof(file_path), "%s", file);
18 if(read_file(file_path) == -1)
19 {
20 gerror("read_file failed\n");
21--- a/core/gimx.c
22+++ b/core/gimx.c
23@@ -8,7 +8,7 @@
24 #include <errno.h> //to print errors
25 #include <string.h> //to print errors
26 #include <limits.h> //PATH_MAX
27-
28+#include <stdlib.h>
29 #ifndef WIN32
30 #include <termios.h> //to disable/enable echo
31 #include <unistd.h>
32@@ -192,7 +192,7 @@
33 char file_path[PATH_MAX];
34
35 snprintf(file_path, sizeof(file_path), "%s%s%s%s", gimx_params.homedir, GIMX_DIR, CONFIG_DIR, gimx_params.config_file);
36-
37+ snprintf(file_path, sizeof(file_path), "%s", gimx_params.config_file);
38 FILE * fp = gfile_fopen(file_path, "r");
39 if (fp == NULL)
40 {
41--- a/core/connectors/bluetooth/linux/bt_mgmt.c
42+++ b/core/connectors/bluetooth/linux/bt_mgmt.c
43@@ -322,7 +322,7 @@ static int read_link_keys(uint16_t index, uint16_t nb_keys, bdaddr_t bdaddrs[nb_
44 bdaddr_t ba;
45 char dongle_bdaddr[18];
46
47- if(bt_device_abs_get(bt_abs_value)->get_bdaddr(index, &ba) < 0)
48+ if(bt_device_abs_get()->get_bdaddr(index, &ba) < 0)
49 {
50 fprintf(stderr, "can't read device bdaddr\n");
51 return -1;