diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-27 10:04:19 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-27 10:04:19 +0200 |
commit | 52aae6d4f11c1142cc644e43d116c3d80ebdd73b (patch) | |
tree | 7965e058ddfaa5eac5eb58ea1797f7f1280a5e98 | |
parent | 7562932eb2f863a659136f2f25064c5a4c3e5929 (diff) | |
parent | f8b0b17634362730d1cc8eddf5b41e73d75e4f82 (diff) |
Merge pull request #66447 from akien-mga/gcc-ubsan-silence-Wmaybe-uninitialized
Silence GCC `-Wmaybe-uninitialized` caused by UBSAN
-rw-r--r-- | core/object/method_bind.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/object/method_bind.h b/core/object/method_bind.h index d60550c899..0d3e40f709 100644 --- a/core/object/method_bind.h +++ b/core/object/method_bind.h @@ -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 &), |