summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@codecoup.pl>2018-05-25 13:24:50 +0200
committerSzymon Janc <szymon.janc@codecoup.pl>2018-05-25 14:06:17 +0200
commit8afe1baa7dd5e864a1d1eff2f6c793dba2a3acfb (patch)
treef1ba1cc0e443115b45568fff1b4148314ab4c763 /android
parentce0b582c2ffa547e3390a0f3cdfeae3a3b144eee (diff)
downloadbluez-8afe1baa7dd5e864a1d1eff2f6c793dba2a3acfb.tar.gz
android: Fix some compilation warnings
Diffstat (limited to 'android')
-rw-r--r--android/hardware/hardware.c6
-rw-r--r--android/ipc-tester.c2
-rw-r--r--android/tester-main.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/android/hardware/hardware.c b/android/hardware/hardware.c
index 4bd5eba5d..3a45fe1f1 100644
--- a/android/hardware/hardware.c
+++ b/android/hardware/hardware.c
@@ -100,12 +100,12 @@ int hw_get_module_by_class(const char *class_id, const char *inst,
const struct hw_module_t **module)
{
char path[PATH_MAX];
- char name[PATH_MAX];
+ char name[PATH_MAX/2];
if (inst)
- snprintf(name, PATH_MAX, "%s.%s", class_id, inst);
+ snprintf(name, sizeof(name), "%s.%s", class_id, inst);
else
- snprintf(name, PATH_MAX, "%s", class_id);
+ snprintf(name, sizeof(name), "%s", class_id);
/*
* Here we rely on the fact that calling dlopen multiple times on
diff --git a/android/ipc-tester.c b/android/ipc-tester.c
index 1aa17d253..3b7f13a0e 100644
--- a/android/ipc-tester.c
+++ b/android/ipc-tester.c
@@ -218,7 +218,7 @@ static void test_post_teardown(const void *data)
static void bluetoothd_start(int hci_index)
{
- char prg_name[PATH_MAX];
+ char prg_name[PATH_MAX + 11];
char index[8];
char *prg_argv[4];
diff --git a/android/tester-main.c b/android/tester-main.c
index e9b13537a..8d9add93c 100644
--- a/android/tester-main.c
+++ b/android/tester-main.c
@@ -253,7 +253,7 @@ static void test_post_teardown(const void *test_data)
static void bluetoothd_start(int hci_index)
{
- char prg_name[PATH_MAX + 1];
+ char prg_name[PATH_MAX + 1 + 11];
char index[8];
char *prg_argv[5];