aboutsummaryrefslogtreecommitdiffstats
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
parent1423442a9a34c93874ca6896a7b037bf08569aa5 (diff)
downloadserd-b5875a49a6d4129be1b222f3e25a7528ce4ec410.tar.gz
serd-b5875a49a6d4129be1b222f3e25a7528ce4ec410.tar.bz2
serd-b5875a49a6d4129be1b222f3e25a7528ce4ec410.zip
Fix building with MSVC
-rw-r--r--NEWS1
-rw-r--r--src/reader.c7
2 files changed, 5 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 6947032d..b1cb13af 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ serd (0.29.2) unstable;
* Support strict parsing of prefixed names
* Report errors for prematurely terminated statements
+ * Fix building with MSVC
-- David Robillard <d@drobilla.net> Mon, 28 Aug 2017 12:39:47 +0200
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;
}