Skip to content

Commit 36e49df

Browse files
committed
pacify compiler
1 parent 5de366c commit 36e49df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/text-coding.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/*
23
* txiki.js
34
*
@@ -228,7 +229,7 @@ static JSValue tjs_utf8_decoder_decode(JSContext *ctx, JSValueConst this_val, in
228229
return JS_ThrowTypeError(ctx, "invalid arguments");
229230
}
230231

231-
uint32_t opts;
232+
uint32_t opts = 0;
232233
if (!JS_IsUndefined(argv[1]) && JS_ToUint32(ctx, &opts, argv[1])) {
233234
return JS_ThrowTypeError(ctx, "invalid arguments");
234235
}
@@ -278,7 +279,7 @@ static JSValue tjs_utf8_decoder_decode(JSContext *ctx, JSValueConst this_val, in
278279
}
279280
} while (true);
280281

281-
end_ok:
282+
end_ok:;
282283
JSValue str = JS_NewStringLen(ctx, (const char *) s.buf, s.size);
283284
dbuf_free(&s);
284285
return str;

0 commit comments

Comments
 (0)