aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/writer.c b/src/writer.c
index eab902c6..09244a7d 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -729,6 +729,8 @@ write_curie(SerdWriter* const writer,
if (is_inline_start(writer, field, flags)) {
TRY(st, esink(" ;", 2, writer));
}
+ default:
+ break;
}
return st;
}
@@ -827,6 +829,10 @@ serd_writer_write_statement(SerdWriter* writer,
assert(!((flags & SERD_ANON_S) && (flags & SERD_LIST_S)));
assert(!((flags & SERD_ANON_O) && (flags & SERD_LIST_O)));
+ if (writer->syntax == SERD_SYNTAX_EMPTY) {
+ return SERD_SUCCESS;
+ }
+
const SerdNode* const subject = serd_statement_get_subject(statement);
const SerdNode* const predicate = serd_statement_get_predicate(statement);
const SerdNode* const object = serd_statement_get_object(statement);
@@ -969,10 +975,9 @@ serd_writer_write_statement(SerdWriter* writer,
}
SERD_WARN_UNUSED_RESULT static SerdStatus
-serd_writer_end_anon(SerdWriter* writer,
- const SerdNode* node)
+serd_writer_end_anon(SerdWriter* writer, const SerdNode* node)
{
- if (writer->syntax == SERD_NTRIPLES || writer->syntax == SERD_NQUADS) {
+ if (writer->syntax != SERD_TURTLE && writer->syntax != SERD_TRIG) {
return SERD_SUCCESS;
} else if (serd_stack_is_empty(&writer->anon_stack)) {
return SERD_LOG_ERROR(writer->world, SERD_ERR_UNKNOWN,