diff options
author | jan Iversen <jani@libreoffice.org> | 2018-05-22 09:07:42 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-05-24 08:34:14 -0700 |
commit | 061be82e31f0d08804cd5d0edc2244540200fcea (patch) | |
tree | 94f0e5da65bab561200f9be245e25c507d6be850 /core/liquivision.c | |
parent | 6e253fa04f81be6fb26ff59cd5be39c85bfe3d19 (diff) | |
download | subsurface-061be82e31f0d08804cd5d0edc2244540200fcea.tar.gz |
core: replace (void) with UNUSED(x) and include ssrf.h
Unused parameters in C are "silenced" by adding UNUSED(x)
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'core/liquivision.c')
-rw-r--r-- | core/liquivision.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/core/liquivision.c b/core/liquivision.c index 7fc027af5..28d571b3c 100644 --- a/core/liquivision.c +++ b/core/liquivision.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include <string.h> +#include "ssrf.h" #include "dive.h" #include "divelist.h" #include "file.h" @@ -36,10 +37,10 @@ struct lv_sensor_ids sensor_ids; static int handle_event_ver2(int code, const unsigned char *ps, unsigned int ps_ptr, struct lv_event *event) { - (void) code; - (void) ps; - (void) ps_ptr; - (void) event; + UNUSED(code); + UNUSED(ps); + UNUSED(ps_ptr); + UNUSED(event); // Skip 4 bytes return 4; @@ -288,9 +289,9 @@ static void parse_dives (int log_version, const unsigned char *buf, unsigned int break; } // we aren't using the start_cns, dive_mode, and algorithm, yet - (void)start_cns; - (void)dive_mode; - (void)algorithm; + UNUSED(start_cns); + UNUSED(dive_mode); + UNUSED(algorithm); ptr += 4; @@ -443,7 +444,7 @@ static void parse_dives (int log_version, const unsigned char *buf, unsigned int int try_to_open_liquivision(const char *filename, struct memblock *mem) { - (void) filename; + UNUSED(filename); const unsigned char *buf = mem->buffer; unsigned int buf_size = mem->size; unsigned int ptr; |