composite_device: fix non-trivial memset
Starting with glibc 2.41 and newer clang revisions, the
compiler does not allow memset on complex data types
which can contain other types like vectors, locks or
strings.
Error is like this:
logitech-updater-0.0.1/src/composite_device.cc:664:12: error:
first argument in call to 'memset' is a pointer to non-trivially copyable
type 'SystemTopology' [-Werror,-Wnontrivial-memcall]
664 | memset(&topology, '\0', sizeof(SystemTopology));
| ^
The fix is to use a default initializer which ensures
all members are properly initialized. We could also
silence by casting the topology arg to void*, however
that is usually a workaround of last resort.
BUG=b:387993322
TEST=emerge-eve sys-apps/logitech-updater; CQ.
Change-Id: Ie9859619560afb2951fe716d96a406bcb16f48ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/logitech-updater/+/6732640
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Adrian Ratiu <adrian.ratiu@collabora.corp-partner.google.com>
Reviewed-by: Niko Tsirakis <ntsirakis@google.com>
Auto-Submit: Adrian Ratiu <adrian.ratiu@collabora.corp-partner.google.com>
Commit-Queue: Adrian Ratiu <adrian.ratiu@collabora.corp-partner.google.com>
logitech-updater is a utility to upgrade logitech camera firmwares.
The GNU C/C++ library is required.
At the top level of the directory.
$ make
Alternatively at Chromium OS development environment,
$ emerge-${BOARD} logitech-updater
logitech updater currently includes the follow executables: ptzpro2-updater $ ptzpro2-updater -h