#14156 closed bug (fixed)

Media kit: Suppress -Werror=class-memaccess

Reported by: mt Owned by: Barrett
Priority: normal Milestone: Unscheduled
Component: Kits/Media Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

https://review.haiku-os.org/#/c/haiku/+/215

Cast pointer of media_format to void* (and const void* for memcpy()) to suppress -Werror=class-memaccess [1]

pointed out by gcc8.

[1] https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/C_002b_002b-Dialect-Options.html#index-Wclass-memaccess

/home/haiku/haiku/haiku/src/kits/media/AddOnManager.cpp:561:53: error: 'void* memset(void*, int, size_t)' clearing an object of type 'struct media_format' with no trivial copy-assignment; use assignment or value-initialization instead [-Werror=class-memaccess]
   memset(&info.intputFormat, 0, sizeof(media_format));
                                                     ^

Change History (1)

comment:1 Changed 10 months ago by waddlesplash

Resolution: fixed
Status: newclosed

Merged in hrev52055. Thanks!

Note: See TracTickets for help on using tickets.