mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +00:00
Merge pull request #66447 from akien-mga/gcc-ubsan-silence-Wmaybe-uninitialized
Silence GCC `-Wmaybe-uninitialized` caused by UBSAN
This commit is contained in:
commit
52aae6d4f1
@ -241,9 +241,17 @@ 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
|
||||
virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Callable::CallError &r_error) override {
|
||||
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
|
||||
|
||||
MethodBindVarArgTR(
|
||||
R (T::*p_method)(const Variant **, int, Callable::CallError &),
|
||||
|
Loading…
Reference in New Issue
Block a user