crunch icon indicating copy to clipboard operation
crunch copied to clipboard

`crn_decomp.h: warning: first argument in call to 'memcpy' is a pointer to non-trivially copyable type` with Clang 20

Open illwieckz opened this issue 11 months ago • 0 comments

Reported by Clang 20 when building the Dæmon game engine:

crunch/inc/crn_decomp.h:1459:12:
 warning: first argument in call to 'memcpy' is a pointer to non-trivially copyable type
 'crnd::prefix_coding::decoder_tables' [-Wnontrivial-memcall]
 1459 |     memcpy(this, &other, sizeof(*this));
      |            ^
crunch/inc/crn_decomp.h:1459:12: note: explicitly cast the pointer to silence this warning
 1459 |     memcpy(this, &other, sizeof(*this));
      |            ^
      |            (void*)

illwieckz avatar Mar 17 '25 12:03 illwieckz