Core: Integrate warning suppression macro helpers
This commit is contained in:
parent
1f56d96cf2
commit
207a2b6472
25 changed files with 119 additions and 180 deletions
|
|
@ -257,11 +257,8 @@ class MethodBindVarArgTR : public MethodBindVarArgBase<MethodBindVarArgTR<T, R>,
|
|||
friend class MethodBindVarArgBase<MethodBindVarArgTR<T, R>, T, R, true>;
|
||||
|
||||
public:
|
||||
#if defined(SANITIZERS_ENABLED) && defined(__GNUC__) && !defined(__clang__)
|
||||
// Workaround GH-66343 raised only with UBSAN, seems to be a false positive.
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
GODOT_GCC_WARNING_PUSH_AND_IGNORE("-Wmaybe-uninitialized") // Workaround GH-66343 raised only with UBSAN, seems to be a false positive.
|
||||
|
||||
virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) const override {
|
||||
#ifdef TOOLS_ENABLED
|
||||
ERR_FAIL_COND_V_MSG(p_object && p_object->is_extension_placeholder() && p_object->get_class_name() == MethodBind::get_instance_class(), Variant(), vformat("Cannot call method bind '%s' on placeholder instance.", MethodBind::get_name()));
|
||||
|
|
@ -269,9 +266,7 @@ public:
|
|||
return (static_cast<T *>(p_object)->*MethodBindVarArgBase<MethodBindVarArgTR<T, R>, T, R, true>::method)(p_args, p_arg_count, r_error);
|
||||
}
|
||||
|
||||
#if defined(SANITIZERS_ENABLED) && defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
GODOT_GCC_WARNING_POP
|
||||
|
||||
MethodBindVarArgTR(
|
||||
R (T::*p_method)(const Variant **, int, Callable::CallError &),
|
||||
|
|
|
|||
|
|
@ -711,11 +711,7 @@ public:
|
|||
|
||||
GDExtensionScriptInstanceDataPtr instance = nullptr;
|
||||
|
||||
// There should not be warnings on explicit casts.
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wignored-qualifiers"
|
||||
#endif
|
||||
GODOT_GCC_WARNING_PUSH_AND_IGNORE("-Wignored-qualifiers") // There should not be warnings on explicit casts.
|
||||
|
||||
virtual bool set(const StringName &p_name, const Variant &p_value) override {
|
||||
if (native_info->set_func) {
|
||||
|
|
@ -963,7 +959,5 @@ public:
|
|||
#endif // DISABLE_DEPRECATED
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) && !defined(__clang__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
GODOT_GCC_WARNING_POP
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue