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 <[email protected]>
Tested-by: Adrian Ratiu <[email protected]>
Reviewed-by: Niko Tsirakis <[email protected]>
Auto-Submit: Adrian Ratiu <[email protected]>
Commit-Queue: Adrian Ratiu <[email protected]>
1 file changed
tree: 1e6a4c28a8b8cff1b22fd63ad10a15afad7b86e0
  1. conf/
  2. seccomp/
  3. src/
  4. .gitignore
  5. common.mk
  6. LICENSE
  7. Makefile
  8. OWNERS
  9. README.md
README.md

logitech-updater is a utility to upgrade logitech camera firmwares.

Requirements

The GNU C/C++ library is required.

Building

At the top level of the directory.

$ make

Alternatively at Chromium OS development environment,

$ emerge-${BOARD} logitech-updater

How to use

logitech updater currently includes the follow executables: ptzpro2-updater
$ ptzpro2-updater -h