summaryrefslogtreecommitdiffstats
path: root/configuredivecomputerthreads.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2014-11-27 21:55:25 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-01 14:31:14 -0800
commitde49957a5277d8a5c3cce6623be8300e95e91c7f (patch)
treee94e7bcb4b601995f8fc51db513f458373161df0 /configuredivecomputerthreads.cpp
parent21bfe88a30ef02c4a1479e48ead372b0dc391e26 (diff)
downloadsubsurface-de49957a5277d8a5c3cce6623be8300e95e91c7f.tar.gz
configuredivecomputerthreads.cpp: conditionally define read_ostc_cf()
Fixes a warning. The function is only used if DC_VERSION_CHECK(0, 5, 0) is defined. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'configuredivecomputerthreads.cpp')
-rw-r--r--configuredivecomputerthreads.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp
index 6d6e08990..e26935d6f 100644
--- a/configuredivecomputerthreads.cpp
+++ b/configuredivecomputerthreads.cpp
@@ -112,9 +112,11 @@ ReadSettingsThread::ReadSettingsThread(QObject *parent, device_data_t *data)
}
+#if DC_VERSION_CHECK(0, 5, 0)
static int read_ostc_cf(unsigned char data[], unsigned char cf) {
return data[128 + (cf % 32) * 4 + 3] << 8 ^ data[128 + (cf % 32) * 4 + 2];
}
+#endif
static void write_ostc_cf(unsigned char data[], unsigned char cf, unsigned char max_CF, unsigned int value) {
// Only write settings supported by this firmware.