aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/n3.c15
-rw-r--r--src/uri_utils.h4
-rw-r--r--src/writer.c2
3 files changed, 12 insertions, 9 deletions
diff --git a/src/n3.c b/src/n3.c
index a41d1b8f..16bac20d 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -283,14 +283,14 @@ read_ws_star(SerdReader* reader)
}
static inline bool
-peek_delim(SerdReader* reader, const char delim)
+peek_delim(SerdReader* reader, const uint8_t delim)
{
read_ws_star(reader);
return peek_byte(reader) == delim;
}
static inline bool
-eat_delim(SerdReader* reader, const char delim)
+eat_delim(SerdReader* reader, const uint8_t delim)
{
if (peek_delim(reader, delim)) {
eat_byte_safe(reader, delim);
@@ -1184,7 +1184,10 @@ read_collection(SerdReader* reader, ReadContext ctx, SerdNode** dest)
}
static SerdStatus
-read_subject(SerdReader* reader, ReadContext ctx, SerdNode** dest, char* s_type)
+read_subject(SerdReader* reader,
+ ReadContext ctx,
+ SerdNode** dest,
+ uint8_t* s_type)
{
SerdStatus st = SERD_SUCCESS;
bool ate_dot = false;
@@ -1345,7 +1348,7 @@ read_wrappedGraph(SerdReader* reader, ReadContext* ctx)
while (peek_byte(reader) != '}') {
const size_t orig_stack_size = reader->stack.size;
bool ate_dot = false;
- char s_type = 0;
+ uint8_t s_type = 0;
ctx->subject = 0;
SerdStatus st = read_subject(reader, *ctx, &ctx->subject, &s_type);
@@ -1390,7 +1393,7 @@ read_n3_statement(SerdReader* reader)
ReadContext ctx = { 0, 0, 0, 0, &flags };
SerdNode* subj = 0;
bool ate_dot = false;
- char s_type = 0;
+ uint8_t s_type = 0;
SerdStatus st = SERD_SUCCESS;
read_ws_star(reader);
switch (peek_byte(reader)) {
@@ -1495,7 +1498,7 @@ read_nquadsDoc(SerdReader* reader)
SerdStatementFlags flags = 0;
ReadContext ctx = { 0, 0, 0, 0, &flags };
bool ate_dot = false;
- char s_type = false;
+ uint8_t s_type = 0;
read_ws_star(reader);
if (peek_byte(reader) == '\0') {
reader->source.eof = true;
diff --git a/src/uri_utils.h b/src/uri_utils.h
index e341b896..0826e50e 100644
--- a/src/uri_utils.h
+++ b/src/uri_utils.h
@@ -65,8 +65,8 @@ uri_rooted_index(const SerdURI* uri, const SerdURI* root)
const size_t root_len = uri_path_len(root);
size_t last_root_slash = 0;
for (size_t i = 0; i < path_len && i < root_len; ++i) {
- const uint8_t u = uri_path_at(uri, i);
- const uint8_t r = uri_path_at(root, i);
+ const char u = uri_path_at(uri, i);
+ const char r = uri_path_at(root, i);
differ = differ || u != r;
if (r == '/') {
diff --git a/src/writer.c b/src/writer.c
index d7603d9a..57e5dc92 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -323,7 +323,7 @@ write_text(SerdWriter* writer, TextContext ctx,
break; // Reached end
}
- const uint8_t in = utf8[i++];
+ const char in = utf8[i++];
if (ctx == WRITE_LONG_STRING) {
switch (in) {
case '\\': len += sink("\\\\", 2, writer); continue;