Skip to content

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

@illwieckz

Description

@illwieckz

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*)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions