aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-30 14:08:44 -0500
committerDavid Robillard <d@drobilla.net>2019-01-05 18:55:50 +0100
commit9b67e27573df7518f136a446268551bd3939cc78 (patch)
tree4d3ac23c352848ec0e2bedf7fbe587c75f5c6a4f
parentec42a28933be723ad274a3013bece33fc043d535 (diff)
downloadserd-9b67e27573df7518f136a446268551bd3939cc78.tar.gz
serd-9b67e27573df7518f136a446268551bd3939cc78.tar.bz2
serd-9b67e27573df7518f136a446268551bd3939cc78.zip
Fix unused parameter warnings
-rw-r--r--src/n3.c4
-rw-r--r--src/reader.c3
-rw-r--r--src/reader.h2
-rw-r--r--src/serdi.c2
-rw-r--r--src/writer.c3
-rw-r--r--tests/serd_test.c10
6 files changed, 20 insertions, 4 deletions
diff --git a/src/n3.c b/src/n3.c
index 37fe995e..a4886d28 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1191,7 +1191,7 @@ read_subject(SerdReader* reader, ReadContext ctx, Ref* dest, char* s_type)
}
static Ref
-read_labelOrSubject(SerdReader* reader, ReadContext ctx)
+read_labelOrSubject(SerdReader* reader)
{
Ref subject = 0;
bool ate_dot = false;
@@ -1392,7 +1392,7 @@ read_n3_statement(SerdReader* reader)
ret = read_prefixID(reader, true, false);
} else if (!tokcmp(reader, ctx.subject, "graph", 5)) {
read_ws_star(reader);
- TRY_RET((ctx.graph = read_labelOrSubject(reader, ctx)));
+ TRY_RET((ctx.graph = read_labelOrSubject(reader)));
read_ws_star(reader);
TRY_RET(read_wrappedGraph(reader, &ctx));
pop_node(reader, ctx.graph);
diff --git a/src/reader.c b/src/reader.c
index f37eac14..1a7f58d4 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -63,6 +63,9 @@ blank_id(SerdReader* reader)
static size_t
serd_file_read_byte(void* buf, size_t size, size_t nmemb, void* stream)
{
+ (void)size;
+ (void)nmemb;
+
const int c = getc((FILE*)stream);
if (c == EOF) {
*((uint8_t*)buf) = 0;
diff --git a/src/reader.h b/src/reader.h
index 723a1c5a..f6cbc7ad 100644
--- a/src/reader.h
+++ b/src/reader.h
@@ -36,6 +36,8 @@ eat_byte(SerdReader* reader)
static inline uint8_t
eat_byte_safe(SerdReader* reader, const uint8_t byte)
{
+ (void)byte;
+
const uint8_t c = eat_byte(reader);
assert(c == byte);
return c;
diff --git a/src/serdi.c b/src/serdi.c
index 16767ffd..527ada50 100644
--- a/src/serdi.c
+++ b/src/serdi.c
@@ -110,6 +110,8 @@ missing_arg(const char* name, char opt)
static SerdStatus
quiet_error_sink(void* handle, const SerdError* e)
{
+ (void)handle;
+ (void)e;
return SERD_SUCCESS;
}
diff --git a/src/writer.c b/src/writer.c
index 69a00d82..8dddf51c 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -419,7 +419,6 @@ write_literal(SerdWriter* writer,
const SerdNode* node,
const SerdNode* datatype,
const SerdNode* lang,
- Field field,
SerdStatementFlags flags)
{
if (supports_abbrev(writer) && datatype && datatype->buf) {
@@ -621,7 +620,7 @@ write_node(SerdWriter* writer,
bool ret = false;
switch (node->type) {
case SERD_LITERAL:
- ret = write_literal(writer, node, datatype, lang, field, flags);
+ ret = write_literal(writer, node, datatype, lang, flags);
break;
case SERD_URI:
ret = write_uri_node(writer, node, field, flags);
diff --git a/tests/serd_test.c b/tests/serd_test.c
index ef1acacb..e537a5f5 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -52,6 +52,9 @@ test_strtod(double dbl, double max_delta)
static SerdStatus
count_prefixes(void* handle, const SerdNode* name, const SerdNode* uri)
{
+ (void)name;
+ (void)uri;
+
++*(int*)handle;
return SERD_SUCCESS;
}
@@ -71,6 +74,13 @@ test_sink(void* handle,
const SerdNode* object_datatype,
const SerdNode* object_lang)
{
+ (void)flags;
+ (void)subject;
+ (void)predicate;
+ (void)object;
+ (void)object_datatype;
+ (void)object_lang;
+
ReaderTest* rt = (ReaderTest*)handle;
++rt->n_statements;
rt->graph = graph;