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-divinglog.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-divinglog.c')
-rw-r--r-- | core/import-divinglog.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/core/import-divinglog.c b/core/import-divinglog.c index 7ddb0be46..4e205d661 100644 --- a/core/import-divinglog.c +++ b/core/import-divinglog.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 divinglog_cylinder(void *handle, int columns, char **data, char **column) { - (void) handle; - (void) columns; - (void) column; + UNUSED(handle); + UNUSED(columns); + UNUSED(column); short dbl = 1; //char get_cylinder_template[] = "select TankID,TankSize,PresS,PresE,PresW,O2,He,DblTank from Tank where LogID = %d"; @@ -60,9 +61,9 @@ extern int divinglog_cylinder(void *handle, int columns, char **data, char **col extern int divinglog_profile(void *handle, int columns, char **data, char **column) { - (void) handle; - (void) columns; - (void) column; + UNUSED(handle); + UNUSED(columns); + UNUSED(column); int sinterval = 0; unsigned long time; @@ -197,7 +198,7 @@ extern int divinglog_profile(void *handle, int columns, char **data, char **colu int ppo2_2 = atoi_n(ptr5 + 3, 3); int ppo2_3 = atoi_n(ptr5 + 6, 3); int otu = atoi_n(ptr5 + 9, 4); - (void) otu; // we seem to not store this? Do we understand its format? + UNUSED(otu); // we seem to not store this? Do we understand its format? int cns = atoi_n(ptr5 + 13, 4); int setpoint = atoi_n(ptr5 + 17, 2); @@ -267,8 +268,8 @@ extern int divinglog_profile(void *handle, int columns, char **data, char **colu extern int divinglog_dive(void *param, int columns, char **data, char **column) { - (void) columns; - (void) column; + UNUSED(columns); + UNUSED(column); int retval = 0; sqlite3 *handle = (sqlite3 *)param; @@ -397,8 +398,8 @@ extern int divinglog_dive(void *param, int columns, char **data, char **column) int parse_divinglog_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; |