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/import-cobalt.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/import-cobalt.c')
-rw-r--r-- | core/import-cobalt.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/core/import-cobalt.c b/core/import-cobalt.c index f6a983734..b8bf33d95 100644 --- a/core/import-cobalt.c +++ b/core/import-cobalt.c @@ -4,6 +4,7 @@ #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif +#include "ssrf.h" #include "dive.h" #include "subsurface-string.h" #include "parse.h" @@ -14,9 +15,9 @@ extern int cobalt_profile_sample(void *handle, int columns, char **data, char **column) { - (void) handle; - (void) columns; - (void) column; + UNUSED(handle); + UNUSED(columns); + UNUSED(column); sample_start(); if (data[0]) @@ -33,9 +34,9 @@ extern int cobalt_profile_sample(void *handle, int columns, char **data, char ** extern int cobalt_cylinders(void *handle, int columns, char **data, char **column) { - (void) handle; - (void) columns; - (void) column; + UNUSED(handle); + UNUSED(columns); + UNUSED(column); cylinder_start(); if (data[0]) @@ -57,9 +58,9 @@ extern int cobalt_cylinders(void *handle, int columns, char **data, char **colum extern int cobalt_buddies(void *handle, int columns, char **data, char **column) { - (void) handle; - (void) columns; - (void) column; + UNUSED(handle); + UNUSED(columns); + UNUSED(column); if (data[0]) utf8_string(data[0], &cur_dive->buddy); @@ -74,18 +75,18 @@ extern int cobalt_buddies(void *handle, int columns, char **data, char **column) extern int cobalt_visibility(void *handle, int columns, char **data, char **column) { - (void) handle; - (void) columns; - (void) column; - (void) data; + UNUSED(handle); + UNUSED(columns); + UNUSED(column); + UNUSED(data); return 0; } extern int cobalt_location(void *handle, int columns, char **data, char **column) { - (void) handle; - (void) columns; - (void) column; + UNUSED(handle); + UNUSED(columns); + UNUSED(column); static char *location = NULL; if (data[0]) { @@ -108,8 +109,8 @@ extern int cobalt_location(void *handle, int columns, char **data, char **column extern int cobalt_dive(void *param, int columns, char **data, char **column) { - (void) columns; - (void) column; + UNUSED(columns); + UNUSED(column); int retval = 0; sqlite3 *handle = (sqlite3 *)param; @@ -217,8 +218,8 @@ extern int cobalt_dive(void *param, int columns, char **data, char **column) int parse_cobalt_buffer(sqlite3 *handle, const char *url, const char *buffer, int size, struct dive_table *table) { - (void) buffer; - (void) size; + UNUSED(buffer); + UNUSED(size); int retval; char *err = NULL; |