Closed thesmallcreeper closed 5 years ago
OK, I think these warnings are actually legit. MipmapRawData holds shared pointers and memsetting these to zero means trouble.
I've fixed this internally and will push out a patch next week.
Dude, thank you. I will try compile with GCC 8.0 and close it if everything is fine. (wait till I reboot to ubuntu)
Hey had a look at code and the fix is way easier than you might think. Just delete memset
s at:
Anvil::MipmapRawData Anvil::MipmapRawData::create_1D_array(Anvil::ImageAspectFlagBits, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)
Anvil::MipmapRawData Anvil::MipmapRawData::create_2D(Anvil::ImageAspectFlagBits, uint32_t, uint32_t, uint32_t)
Anvil::MipmapRawData Anvil::MipmapRawData::create_2D_array(Anvil::ImageAspectFlagBits, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)
Anvil::MipmapRawData Anvil::MipmapRawData::create_3D(Anvil::ImageAspectFlagBits, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)
There is already a default constructor that set the values to zero. GCC 8+ looks like dislike memsets.
Did a pull request. Now should be fine. Feel free to close this issue if you accept my pull request ;)
Thanks for contributing the PR. we already had this patched up internally which is why I did not merge your changes. Still, appreciate your work on this.
Fixed in the latest version.
Looks like GCC 8 has some restrictions in the use of memset function. Latest GCC 7 (and Clang) compile just fine. Bellow I paste the error message. By the way my Anvil fork has been modified but only on the window-I/O part of it (so has nothing to do).