aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/n3.c7
-rw-r--r--src/string.c3
-rw-r--r--src/writer.c3
3 files changed, 13 insertions, 0 deletions
diff --git a/src/n3.c b/src/n3.c
index 3a18bbac..4b1ed676 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -121,6 +121,9 @@ read_UCHAR(SerdReader* reader, Ref dest, uint32_t* char_code)
// fallthru
case 1:
buf[0] = (uint8_t)c;
+ // fallthru
+ default:
+ break;
}
push_bytes(reader, dest, buf, size);
@@ -243,6 +246,8 @@ read_character(SerdReader* reader, Ref dest, SerdNodeFlags* flags, uint8_t c)
case '"': case '\'':
*flags |= SERD_HAS_QUOTE;
break;
+ default:
+ break;
}
push_byte(reader, dest, c);
return SERD_SUCCESS;
@@ -661,6 +666,8 @@ read_IRIREF(SerdReader* reader)
r_err(reader, SERD_ERR_BAD_SYNTAX,
"invalid escaped IRI character %X %c\n", code, code);
return pop_node(reader, ref);
+ default:
+ break;
}
break;
default:
diff --git a/src/string.c b/src/string.c
index b73cea03..6a3219c7 100644
--- a/src/string.c
+++ b/src/string.c
@@ -41,6 +41,7 @@ serd_strerror(SerdStatus status)
case SERD_ERR_ID_CLASH: return (const uint8_t*)"Blank node ID clash";
case SERD_ERR_BAD_CURIE: return (const uint8_t*)"Invalid CURIE";
case SERD_ERR_INTERNAL: return (const uint8_t*)"Internal error";
+ default: break;
}
return (const uint8_t*)"Unknown error"; // never reached
}
@@ -54,6 +55,8 @@ serd_update_flags(const uint8_t c, SerdNodeFlags* const flags)
break;
case '"':
*flags |= SERD_HAS_QUOTE;
+ default:
+ break;
}
}
diff --git a/src/writer.c b/src/writer.c
index aeac9b36..f4edf731 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -259,6 +259,8 @@ lname_must_escape(const uint8_t c)
case '(': case ')': case '*': case '+': case ',': case '/':
case ';': case '=': case '?': case '@': case '~':
return true;
+ default:
+ break;
}
return false;
}
@@ -338,6 +340,7 @@ write_text(SerdWriter* writer, TextContext ctx,
switch (in) {
case '\b': len += sink("\\b", 2, writer); continue;
case '\f': len += sink("\\f", 2, writer); continue;
+ default: break;
}
}
}