mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
2258939566
commit
19b4477cd9
1 changed files with 7 additions and 13 deletions
|
@ -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, ...)
|
static void dev_info(device_data_t *devdata, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
(void) devdata;
|
||||||
static char buffer[1024];
|
static char buffer[1024];
|
||||||
va_list ap;
|
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)
|
static int parse_samples(device_data_t *devdata, struct divecomputer *dc, dc_parser_t *parser)
|
||||||
{
|
{
|
||||||
|
(void) devdata;
|
||||||
// Parse the sample data.
|
// Parse the sample data.
|
||||||
return dc_parser_samples_foreach(parser, sample_cb, dc);
|
return dc_parser_samples_foreach(parser, sample_cb, dc);
|
||||||
}
|
}
|
||||||
|
@ -415,15 +417,6 @@ static int find_dive(struct divecomputer *match)
|
||||||
return 0;
|
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.
|
* Like g_strdup_printf(), but without the stupid g_malloc/g_free confusion.
|
||||||
* And we limit the string to some arbitrary size.
|
* 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)
|
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_progress_t *progress = data;
|
||||||
const dc_event_devinfo_t *devinfo = data;
|
const dc_event_devinfo_t *devinfo = data;
|
||||||
const dc_event_clock_t *clock = 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;
|
int import_thread_cancelled;
|
||||||
|
|
||||||
static int
|
static int cancel_cb(void *userdata)
|
||||||
cancel_cb(void *userdata)
|
|
||||||
{
|
{
|
||||||
|
(void) userdata;
|
||||||
return import_thread_cancelled;
|
return import_thread_cancelled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -926,9 +920,9 @@ static const char *do_device_import(device_data_t *data)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void logfunc(dc_context_t *context, dc_loglevel_t loglevel, const char *file, unsigned int line, const char *function, const char *msg, void *userdata)
|
||||||
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" };
|
const char *loglevels[] = { "NONE", "ERROR", "WARNING", "INFO", "DEBUG", "ALL" };
|
||||||
|
|
||||||
FILE *fp = (FILE *)userdata;
|
FILE *fp = (FILE *)userdata;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue