You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling with GCC 9 on Linux I get these errors: Libs/Anvil/src/misc/types_struct.cpp: In constructor ‘Anvil::FormatProperties::FormatProperties()’: Libs/Anvil/src/misc/types_struct.cpp:1168:26: error: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct Anvil::FormatProperties’ with no trivial copy-assignment; use assignment or value-initialization instead [-Werror=class-memaccess] 1168 | sizeof(*this) ); | ^ In file included from Libs/Anvil/include/misc/types_classes.h:25, from Libs/Anvil/include/misc/types.h:286, from Libs/Anvil/include/misc/descriptor_set_create_info.h:26, from Libs/Anvil/src/misc/types_struct.cpp:22: Libs/Anvil/include/misc/types_struct.h:1272:20: note: ‘struct Anvil::FormatProperties’ declared here 1272 | typedef struct FormatProperties | ^~~~~~~~~~~~~~~~ Libs/Anvil/src/misc/types_struct.cpp: In constructor ‘Anvil::SparseImageAspectProperties::SparseImageAspectProperties()’: Libs/Anvil/src/misc/types_struct.cpp:3792:26: error: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct Anvil::SparseImageAspectProperties’ with no trivial copy-assignment; use assignment or value-initialization instead [-Werror=class-memaccess] 3792 | sizeof(*this) ); | ^ In file included from Libs/Anvil/include/misc/types_classes.h:25, from Libs/Anvil/include/misc/types.h:286, from Libs/Anvil/include/misc/descriptor_set_create_info.h:26, from Libs/Anvil/src/misc/types_struct.cpp:22: Libs/Anvil/include/misc/types_struct.h:2854:20: note: ‘struct Anvil::SparseImageAspectProperties’ declared here 2854 | typedef struct SparseImageAspectProperties | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
Can confirm still an issue; the offending code is the memset in these structs' empty initializers; I think in C++11 forward these can just be empty, as the struct is zero-initialized by default; or like I did just set each member to its empty initializer:
@dmarian if you were still trying to build. If any maintainers would like a pull request, I don't mind putting one together, but I imagine ya'll probably have a better notion of what you'd prefer to do here than I.
When compiling with GCC 9 on Linux I get these errors:
Libs/Anvil/src/misc/types_struct.cpp: In constructor ‘Anvil::FormatProperties::FormatProperties()’: Libs/Anvil/src/misc/types_struct.cpp:1168:26: error: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct Anvil::FormatProperties’ with no trivial copy-assignment; use assignment or value-initialization instead [-Werror=class-memaccess] 1168 | sizeof(*this) ); | ^ In file included from Libs/Anvil/include/misc/types_classes.h:25, from Libs/Anvil/include/misc/types.h:286, from Libs/Anvil/include/misc/descriptor_set_create_info.h:26, from Libs/Anvil/src/misc/types_struct.cpp:22: Libs/Anvil/include/misc/types_struct.h:1272:20: note: ‘struct Anvil::FormatProperties’ declared here 1272 | typedef struct FormatProperties | ^~~~~~~~~~~~~~~~ Libs/Anvil/src/misc/types_struct.cpp: In constructor ‘Anvil::SparseImageAspectProperties::SparseImageAspectProperties()’: Libs/Anvil/src/misc/types_struct.cpp:3792:26: error: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct Anvil::SparseImageAspectProperties’ with no trivial copy-assignment; use assignment or value-initialization instead [-Werror=class-memaccess] 3792 | sizeof(*this) ); | ^ In file included from Libs/Anvil/include/misc/types_classes.h:25, from Libs/Anvil/include/misc/types.h:286, from Libs/Anvil/include/misc/descriptor_set_create_info.h:26, from Libs/Anvil/src/misc/types_struct.cpp:22: Libs/Anvil/include/misc/types_struct.h:2854:20: note: ‘struct Anvil::SparseImageAspectProperties’ declared here 2854 | typedef struct SparseImageAspectProperties | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered: