Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

Texture2DDecoderNative - GCC - Add missing header for memset #896

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KiruyaMomochi
Copy link

Texture2DDecoderNative fails to build with GNU toolchain due to memset undefined.
This pull request adds string.h to crn_depcomp.h so the compilation can success.

Note:

This is the minimum effort to make it compile with gcc when NDEBUG is set (i.e. in release mode).
However, compilation still fails when NDEBUG is not set or clang is used due to pointer cast problem, for example:

crunch/crn_decomp.h: In function ‘void* crnd::crnd_malloc(size_t, size_t*)’:
crunch/crn_decomp.h:2534:20: error: cast from ‘crnd::uint8*’ {aka ‘unsigned char*’} to ‘crnd::uint32’ {aka ‘unsigned int’} loses precision [-fpermissive]

@KiruyaMomochi KiruyaMomochi changed the title Texture2DDecoderNative - GCC compile - Add missing header for memset Texture2DDecoderNative - GCC - Add missing header for memset Dec 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant