camera: intel: ipu3/ipu6: address glibc+clang mem op failures

Starting with glibc 2.41 and newer clang(++) revisions,
the compiler does not allow memcpy & friends on complex
data types which can contain other types like vectors,
locks or strings.

For ipu3, we follow the compiler recommendation and use
a static_cast<void*> to silence the warn/error because
the code is mostly C pointer magic. Thus we preserve
the existing behavior.

For ipu6, which is more proper C++, we add a missing
default constructor so the members get initialized to
their default values when using default operators and
also use placement-new syntax to value-initialize in
an existing memory location.

BUG=b:387993322
TEST=emerge-atlas media-libs/cros-camera-hal-intel-ipu3; CQ.

Change-Id: Ie9859619561afb2951ae216d96a416bdb86d38af
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/camera/+/6760037
Tested-by: Yudhistira Erlandinata <yerlandinata@chromium.org>
Reviewed-by: George Burgess <gbiv@chromium.org>
Auto-Submit: Adrian Ratiu <adrian.ratiu@collabora.corp-partner.google.com>
Commit-Queue: Adrian Ratiu <adrian.ratiu@collabora.corp-partner.google.com>
Reviewed-by: Yudhistira Erlandinata <yerlandinata@chromium.org>
Tested-by: Adrian Ratiu <adrian.ratiu@collabora.corp-partner.google.com>
5 files changed
tree: f8fec9b4e1590217a505aac4681ea4a4e1966e53
  1. hal/
  2. .gitignore
  3. .presubmitignore
  4. DIR_METADATA
  5. OWNERS
  6. README.md
README.md

Chrome OS Platform Camera

This repository hosts all the platform camera code contributed by partners and vendors.