Fix -Wnontrivial-memcall warning
Memcall functions work at the byte level so they don't know about C++
semantics and these C++ objects might not have trivial
constructors or destructors. I silenced the warning by explicitly
casting the pointer to void* with static_cast. I did this fix because I
assume the code developer knows the consequences with using memcall
functions with C++ objects.
frameworks/base/libs/androidfw/include/androidfw/ConfigDescription.h:153:10:
error: first argument in call to 'memset' is a pointer to non-trivially
copyable type 'android::ConfigDescription'
[-Werror,-Wnontrivial-memcall]
153 | memset(this, 0, sizeof(*this));
| ^
Flag: EXEMPT bugfix
Bug: 430598176
Test: m && presubmits
Change-Id: I64df06fcd9267914a65c6cb3a3ae7708b41b33bd
Loading
Please register or sign in to comment