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

Commit 97db8faf 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 replaced it with an assignment because
clang will compile to a memcpy but avoid the warning. This is a better
solution because type information is maintained and the compiler might
want to warn about other things if the class has changes in the future.

build/make/tools/zipalign/ZipEntry.cpp:150:12: error: first argument in
call to 'memcpy' is a pointer to non-trivially copyable type
'CentralDirEntry' [-Werror,-Wnontrivial-memcall]
  150 |     memcpy(&mCDE, &pEntry->mCDE, sizeof(mCDE));
      |            ^

Bug: 430598176
Test: m & presubmits
Change-Id: Ibac2abf7cd0dd0dd0866df2778d27ce3c44e857d
parent 6b9c94cc
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