aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-08-29 12:50:08 +0200
committerDavid Robillard <d@drobilla.net>2017-08-29 12:50:08 +0200
commitb5875a49a6d4129be1b222f3e25a7528ce4ec410 (patch)
treed4c66dd00ef829315bf8422fb79a35a493841744 /src/reader.c
parent1423442a9a34c93874ca6896a7b037bf08569aa5 (diff)
downloadserd-b5875a49a6d4129be1b222f3e25a7528ce4ec410.tar.gz
serd-b5875a49a6d4129be1b222f3e25a7528ce4ec410.tar.bz2
serd-b5875a49a6d4129be1b222f3e25a7528ce4ec410.zip
Fix building with MSVC
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/reader.c b/src/reader.c
index f1b445b9..65fd38f7 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -166,7 +166,7 @@ eat_string(SerdReader* reader, const char* str, unsigned n)
{
bool bad = false;
for (unsigned i = 0; i < n; ++i) {
- bad |= eat_byte_check(reader, ((const uint8_t*)str)[i]);
+ bad |= (bool)eat_byte_check(reader, ((const uint8_t*)str)[i]);
}
return bad;
}
@@ -649,8 +649,9 @@ read_PN_CHARS_BASE(SerdReader* reader, Ref dest)
eat_byte_safe(reader, c)))) {
return st;
} else if (reader->strict && !is_PN_CHARS_BASE(code)) {
- return r_err(reader, SERD_ERR_BAD_SYNTAX,
- "invalid character U+%04X in name\n", code);
+ r_err(reader, SERD_ERR_BAD_SYNTAX,
+ "invalid character U+%04X in name\n", code);
+ return SERD_ERR_BAD_SYNTAX;
}
return st;
}