The stbi__sbraw() macro in stb_image_write.h causes Clang to spew about 24 warnings complaining that "cast from 'unsigned char *' to 'int *' increases required alignment from 1 to 4" when compiled with the -Wcast-align option. In practice, this is spurious so long as STBIW_MALLOC() and STBIW_REALLOC() follow the usual alignment semantics for malloc() and realloc() in that they align sufficiently for any built-in type. To quell the warning, we can cast through a void pointer as an intermediary.master
parent
f67165c2bb
commit
57b9ea6510
2 changed files with 2 additions and 2 deletions
Loading…
Reference in New Issue