1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-02-05 04:10:07 +00:00

Ignore clang warning Wnontrivial-memaccess (#8129, #8135)

Amend 88e2327
Use void* cast in backend where the memset are infrequent.
This commit is contained in:
ocornut 2024-11-07 19:08:37 +01:00
parent 17bd417a3d
commit 419a9ada16
7 changed files with 9 additions and 19 deletions

View file

@ -1135,6 +1135,7 @@ CODE
#pragma clang diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function // using printf() is a misery with this as C++ va_arg ellipsis changes float to double.
#pragma clang diagnostic ignored "-Wimplicit-int-float-conversion" // warning: implicit conversion from 'xxx' to 'float' may lose precision
#pragma clang diagnostic ignored "-Wunsafe-buffer-usage" // warning: 'xxx' is an unsafe pointer used for buffer access
#pragma clang diagnostic ignored "-Wnontrivial-memaccess" // warning: first argument in call to 'memset' is a pointer to non-trivially copyable type
#elif defined(__GNUC__)
// We disable -Wpragmas because GCC doesn't provide a has_warning equivalent and some forks/patches may not follow the warning/version association.
#pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind