Silence warnings in libdivecomputer.c

There was also a function not being used that could be safely removed.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2016-03-07 16:47:26 -03:00 committed by Dirk Hohndel
parent 2258939566
commit 19b4477cd9

View file

@ -343,6 +343,7 @@ sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
static void dev_info(device_data_t *devdata, const char *fmt, ...)
{
(void) devdata;
static char buffer[1024];
va_list ap;
@ -356,6 +357,7 @@ static int import_dive_number = 0;
static int parse_samples(device_data_t *devdata, struct divecomputer *dc, dc_parser_t *parser)
{
(void) devdata;
// Parse the sample data.
return dc_parser_samples_foreach(parser, sample_cb, dc);
}
@ -415,15 +417,6 @@ static int find_dive(struct divecomputer *match)
return 0;
}
static inline int year(int year)
{
if (year < 70)
return year + 2000;
if (year < 100)
return year + 1900;
return year;
}
/*
* Like g_strdup_printf(), but without the stupid g_malloc/g_free confusion.
* And we limit the string to some arbitrary size.
@ -812,6 +805,7 @@ static unsigned int fixup_suunto_versions(device_data_t *devdata, const dc_event
static void event_cb(dc_device_t *device, dc_event_type_t event, const void *data, void *userdata)
{
(void) device;
const dc_event_progress_t *progress = data;
const dc_event_devinfo_t *devinfo = data;
const dc_event_clock_t *clock = data;
@ -876,9 +870,9 @@ static void event_cb(dc_device_t *device, dc_event_type_t event, const void *dat
int import_thread_cancelled;
static int
cancel_cb(void *userdata)
static int cancel_cb(void *userdata)
{
(void) userdata;
return import_thread_cancelled;
}
@ -926,9 +920,9 @@ static const char *do_device_import(device_data_t *data)
return NULL;
}
void
logfunc(dc_context_t *context, dc_loglevel_t loglevel, const char *file, unsigned int line, const char *function, const char *msg, void *userdata)
void logfunc(dc_context_t *context, dc_loglevel_t loglevel, const char *file, unsigned int line, const char *function, const char *msg, void *userdata)
{
(void) context;
const char *loglevels[] = { "NONE", "ERROR", "WARNING", "INFO", "DEBUG", "ALL" };
FILE *fp = (FILE *)userdata;