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

@ -4,6 +4,7 @@
#pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif
#include "ssrf.h"
#include <stdio.h>
#include <ctype.h>
#include <string.h>
@ -404,8 +405,8 @@ static void gasmix(char *buffer, fraction_t *fraction)
static void gasmix_nitrogen(char *buffer, struct gasmix *gasmix)
{
(void) buffer;
(void) gasmix;
UNUSED(buffer);
UNUSED(gasmix);
/* Ignore n2 percentages. There's no value in them. */
}
@ -925,7 +926,7 @@ static void try_to_fill_sample(struct sample *sample, const char *name, char *bu
static void try_to_fill_userid(const char *name, char *buf)
{
(void) name;
UNUSED(name);
if (prefs.save_userid_local)
set_userid(buf);
}
@ -1606,7 +1607,7 @@ static const char *preprocess_divelog_de(const char *buffer)
int parse_xml_buffer(const char *url, const char *buffer, int size,
struct dive_table *table, const char **params)
{
(void) size;
UNUSED(size);
xmlDoc *doc;
const char *res = preprocess_divelog_de(buffer);
int ret = 0;