Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a47361e authored by Sharjeel Khan's avatar Sharjeel Khan
Browse files

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
parent e22d9d10
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment