aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-14 16:02:35 +0200
committerDavid Robillard <d@drobilla.net>2020-08-14 19:07:52 +0200
commita9a6a4e417189b53ee559278be5d242986120422 (patch)
tree76b4df6c11520af0f2998cdd1b1914122524458f /src/writer.c
parent1172f40724d2774be6c9f089c46ef377f2325957 (diff)
downloadserd-a9a6a4e417189b53ee559278be5d242986120422.tar.gz
serd-a9a6a4e417189b53ee559278be5d242986120422.tar.bz2
serd-a9a6a4e417189b53ee559278be5d242986120422.zip
Fix Wswitch-enum warnings
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/writer.c b/src/writer.c
index 31050853..61ff9864 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -642,6 +642,8 @@ write_node(SerdWriter* writer,
{
bool ret = false;
switch (node->type) {
+ case SERD_NOTHING:
+ break;
case SERD_LITERAL:
ret = write_literal(writer, node, datatype, lang, flags);
break;
@@ -653,7 +655,7 @@ write_node(SerdWriter* writer,
break;
case SERD_BLANK:
ret = write_blank(writer, node, field, flags);
- default: break;
+ break;
}
writer->last_sep = SEP_NONE;
return ret;
@@ -715,9 +717,7 @@ serd_writer_write_statement(SerdWriter* writer,
} \
} while (0)
- switch (writer->syntax) {
- case SERD_NTRIPLES:
- case SERD_NQUADS:
+ if (writer->syntax == SERD_NTRIPLES || writer->syntax == SERD_NQUADS) {
TRY(write_node(writer, subject, NULL, NULL, FIELD_SUBJECT, flags));
sink(" ", 1, writer);
TRY(write_node(writer, predicate, NULL, NULL, FIELD_PREDICATE, flags));
@@ -729,8 +729,6 @@ serd_writer_write_statement(SerdWriter* writer,
}
sink(" .\n", 3, writer);
return SERD_SUCCESS;
- default:
- break;
}
if ((graph && !serd_node_equals(graph, &writer->context.graph)) ||