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
Loading
Please register or sign in to comment