Skip to content

Conversation

@illwieckz
Copy link
Member

Fix a warning I get when compiling q3map2:

[ 42%] Building CXX object libs/crnrgba/CMakeFiles/crnrgba.dir/crn_rgba.cpp.o
[ 42%] Linking C static library libpicomodel.a
In file included from netradiant/libs/crnrgba/crn_rgba.cpp:31:
netradiant/libs/crnrgba/../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));
      |            ^
netradiant/libs/crnrgba/../crunch/inc/crn_decomp.h:1459:12: note: explicitly cast the pointer to silence
 this warning
 1459 |     memcpy(this, &other, sizeof(*this));
      |            ^
      |            (void*)

…nter to non-trivially copyable type ‘crnd::prefix_coding::decoder_tables’
@illwieckz
Copy link
Member Author

<perturbed> LGTM https://github.com/DaemonEngine/crunch/pull/84

@illwieckz illwieckz merged commit 3ab50c4 into master Jul 16, 2025
9 of 15 checks passed
@illwieckz illwieckz deleted the illwieckz/cast branch July 16, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants