summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-26 07:54:57 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-26 19:27:03 -0700
commit7fb4dd7a035a25ec5c5ada52f36cc6ab683a0dec (patch)
tree371355aac5f37ccb76d0f3ea85b6b156aac8525e /core
parent0c2bfc1103d9f74877027c78a094d003412611e2 (diff)
downloadsubsurface-7fb4dd7a035a25ec5c5ada52f36cc6ab683a0dec.tar.gz
cleanup: remove unused function argument
Also, only compile the static function where it is used. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r--core/libdivecomputer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c
index 0194aa7f2..dff44e287 100644
--- a/core/libdivecomputer.c
+++ b/core/libdivecomputer.c
@@ -1340,7 +1340,8 @@ static dc_status_t irda_device_open(dc_iostream_t **iostream, dc_context_t *cont
return dc_irda_open(&data->iostream, context, address, 1);
}
-static dc_status_t bluetooth_device_open(dc_iostream_t **iostream, dc_context_t *context, device_data_t *data)
+#if defined(BT_SUPPORT) && !defined(__ANDROID__) && !defined(__APPLE__)
+static dc_status_t bluetooth_device_open(dc_context_t *context, device_data_t *data)
{
dc_bluetooth_address_t address = 0;
dc_iterator_t *iterator = NULL;
@@ -1363,6 +1364,7 @@ static dc_status_t bluetooth_device_open(dc_iostream_t **iostream, dc_context_t
dev_info(data, "Opening rfcomm address %llu", address);
return dc_bluetooth_open(&data->iostream, context, address, 0);
}
+#endif
dc_status_t divecomputer_device_open(device_data_t *data)
{
@@ -1386,7 +1388,7 @@ dc_status_t divecomputer_device_open(device_data_t *data)
// we don't have BT on iOS in the first place, so this is for Android and macOS
rc = rfcomm_stream_open(&data->iostream, context, data->devname);
#else
- rc = bluetooth_device_open(&data->iostream, context, data);
+ rc = bluetooth_device_open(context, data);
#endif
if (rc == DC_STATUS_SUCCESS)
return rc;