summaryrefslogtreecommitdiffstats
path: root/core/profile.c
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@libreoffice.org>2018-05-22 09:07:42 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-24 08:34:14 -0700
commit061be82e31f0d08804cd5d0edc2244540200fcea (patch)
tree94f0e5da65bab561200f9be245e25c507d6be850 /core/profile.c
parent6e253fa04f81be6fb26ff59cd5be39c85bfe3d19 (diff)
downloadsubsurface-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/profile.c')
-rw-r--r--core/profile.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/profile.c b/core/profile.c
index 401228600..113f62845 100644
--- a/core/profile.c
+++ b/core/profile.c
@@ -2,6 +2,7 @@
/* profile.c */
/* creates all the necessary data for drawing the dive profile
*/
+#include "ssrf.h"
#include "gettext.h"
#include <limits.h>
#include <string.h>
@@ -373,9 +374,9 @@ static int set_setpoint(struct plot_info *pi, int i, int setpoint, int end)
static void check_setpoint_events(struct dive *dive, struct divecomputer *dc, struct plot_info *pi)
{
+ UNUSED(dive);
int i = 0;
pressure_t setpoint;
- (void) dive;
setpoint.mbar = 0;
struct event *ev = get_next_event(dc->events, "SP change");
@@ -502,12 +503,11 @@ struct plot_info calculate_max_limits_new(struct dive *dive, struct divecomputer
struct plot_data *populate_plot_entries(struct dive *dive, struct divecomputer *dc, struct plot_info *pi)
{
-
+ UNUSED(dive);
int idx, maxtime, nr, i;
int lastdepth, lasttime, lasttemp = 0;
struct plot_data *plot_data;
struct event *ev = dc->events;
- (void) dive;
maxtime = pi->maxtime;
/*
@@ -793,8 +793,8 @@ static void calculate_sac(struct dive *dive, struct divecomputer *dc, struct plo
static void populate_secondary_sensor_data(struct divecomputer *dc, struct plot_info *pi)
{
- (void) dc;
- (void) pi;
+ UNUSED(dc);
+ UNUSED(pi);
/* We should try to see if it has interesting pressure data here */
}
@@ -1322,7 +1322,7 @@ void create_plot_info_new(struct dive *dive, struct divecomputer *dc, struct plo
struct deco_state plot_deco_state;
init_decompression(&plot_deco_state, dive);
#else
- (void)planner_ds;
+ UNUSED(planner_ds);
#endif
/* Create the new plot data */
free((void *)last_pi_entry_new);