Skip to content

Commit 24fc48d

Browse files
author
Brian West
committed
refactor: clean up warnings
1 parent d6f7db1 commit 24fc48d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

SCsub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def dump_text_file_to_cpp(file):
1919
length = len(lines)
2020
for i in range(length):
2121
line = lines[i].replace('"', '\\"')
22-
line = '\t"' + line + '\\n"';
22+
line = '\t"' + line + '\\n"'
2323
if i < length -1:
2424
line += "\n"
2525
source += line

quickjs/quickjs_binder.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ JSValue QuickJSBinder::object_method(JSContext *ctx, JSValueConst this_val, int
188188
}
189189
ERR_PRINTS(obj->get_class() + "." + mb->get_name() + ENDL + err_message + ENDL + stack_message);
190190
JS_FreeValue(ctx, ret);
191-
ret = JS_ThrowTypeError(ctx, err_message.utf8().get_data());
191+
ret = JS_ThrowTypeError(ctx, "%s", err_message.utf8().get_data());
192192
}
193193
#endif
194194

@@ -805,7 +805,7 @@ JSClassID QuickJSBinder::register_class(const ClassDB::ClassInfo *p_cls) {
805805
if (class_remap.has(p_cls->name)) {
806806
data.class_name = class_remap[p_cls->name];
807807
data.jsclass.class_name = class_remap[p_cls->name];
808-
if (data.jsclass.class_name == "") {
808+
if (strcmp(data.jsclass.class_name, "") == 0) {
809809
return 0;
810810
}
811811
} else {
@@ -2215,7 +2215,7 @@ const ECMAClassInfo *QuickJSBinder::parse_ecma_class_from_module(ModuleCache *p_
22152215
if (!JS_IsFunction(ctx, default_entry)) {
22162216
String err = "Failed parse ECMAClass from script " + p_path + ENDL "\t" + "Default export entry must be a godot class!";
22172217
ERR_PRINTS(err);
2218-
JS_ThrowTypeError(ctx, err.utf8().get_data());
2218+
JS_ThrowTypeError(ctx, "%s", err.utf8().get_data());
22192219
goto fail;
22202220
}
22212221
ecma_class = register_ecma_class(default_entry, p_path);

0 commit comments

Comments
 (0)