mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
Follow declaration of variables before for loop
This commit is contained in:
parent
86b1853a21
commit
ba863b1a82
1 changed files with 5 additions and 3 deletions
|
@ -6673,7 +6673,7 @@ static void build_backtrace(JSContext *ctx, JSValue error_obj,
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
if (has_prepare) {
|
if (has_prepare) {
|
||||||
int j = 0;
|
int j = 0, k;
|
||||||
stack = JS_NewArray(ctx);
|
stack = JS_NewArray(ctx);
|
||||||
if (JS_IsException(stack)) {
|
if (JS_IsException(stack)) {
|
||||||
stack = JS_NULL;
|
stack = JS_NULL;
|
||||||
|
@ -6689,7 +6689,7 @@ static void build_backtrace(JSContext *ctx, JSValue error_obj,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Clear the csd's we didn't use in case of error.
|
// Clear the csd's we didn't use in case of error.
|
||||||
for (int k = j; k < i; k++) {
|
for (k = j; k < i; k++) {
|
||||||
JS_FreeValue(ctx, csd[k].filename);
|
JS_FreeValue(ctx, csd[k].filename);
|
||||||
JS_FreeValue(ctx, csd[k].func);
|
JS_FreeValue(ctx, csd[k].func);
|
||||||
JS_FreeValue(ctx, csd[k].func_name);
|
JS_FreeValue(ctx, csd[k].func_name);
|
||||||
|
@ -49847,7 +49847,9 @@ static struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
static BOOL string_get_tzabbr(const uint8_t *sp, int *pp, int *offset) {
|
static BOOL string_get_tzabbr(const uint8_t *sp, int *pp, int *offset) {
|
||||||
for (size_t i = 0; i < countof(js_tzabbr); i++) {
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < countof(js_tzabbr); i++) {
|
||||||
if (string_match(sp, pp, js_tzabbr[i].name)) {
|
if (string_match(sp, pp, js_tzabbr[i].name)) {
|
||||||
*offset = js_tzabbr[i].offset;
|
*offset = js_tzabbr[i].offset;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue