Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: clean up warnings
  • Loading branch information
Brian West committed Apr 23, 2021
commit 24fc48d9cef4b521283ee0a66a136ade7b5576c1
2 changes: 1 addition & 1 deletion SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def dump_text_file_to_cpp(file):
length = len(lines)
for i in range(length):
line = lines[i].replace('"', '\\"')
line = '\t"' + line + '\\n"';
line = '\t"' + line + '\\n"'
if i < length -1:
line += "\n"
source += line
Expand Down
6 changes: 3 additions & 3 deletions quickjs/quickjs_binder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ JSValue QuickJSBinder::object_method(JSContext *ctx, JSValueConst this_val, int
}
ERR_PRINTS(obj->get_class() + "." + mb->get_name() + ENDL + err_message + ENDL + stack_message);
JS_FreeValue(ctx, ret);
ret = JS_ThrowTypeError(ctx, err_message.utf8().get_data());
ret = JS_ThrowTypeError(ctx, "%s", err_message.utf8().get_data());
}
#endif

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