aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/writer.c b/src/writer.c
index 6b7e39b5..99a9beac 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -117,7 +117,7 @@ struct SerdWriterImpl {
SerdLogFunc log_func;
void* log_handle;
WriteContext context;
- unsigned indent;
+ int indent;
char* bprefix;
size_t bprefix_len;
Sep last_sep;
@@ -353,7 +353,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;
@@ -414,7 +414,7 @@ static void
write_newline(SerdWriter* writer)
{
sink("\n", 1, writer);
- for (unsigned i = 0; i < writer->indent; ++i) {
+ for (int i = 0; i < writer->indent; ++i) {
sink("\t", 1, writer);
}
}
@@ -426,7 +426,7 @@ write_sep(SerdWriter* writer, const Sep sep)
// Adjust indent, but tolerate if it would become negative
writer->indent =
- ((rule->indent >= 0 || writer->indent >= (unsigned)-rule->indent)
+ ((rule->indent >= 0 || writer->indent >= -rule->indent)
? writer->indent + rule->indent
: 0);