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>
This commit is contained in:
jan Iversen 2018-05-22 09:07:42 +02:00 committed by Dirk Hohndel
parent 6e253fa04f
commit 061be82e31
21 changed files with 213 additions and 198 deletions

View file

@ -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);