CuraEngine
CuraEngine copied to clipboard
Fix warnings
Tested with Clang 13 and GCC 11.2.
Updating to the latest master of rapidjson solves the warnings from that code. This PR doesn't update it as there is no release since v1.1. But I'm not sure if there ever will be another release.
About: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'class cura::TimeEstimateCalculator::Block'; use assignment or value-initialization instead [-Wclass-memaccess]
Should I add this commit?
I don't know which IDE you're using but we recently update our clang-tidy and clang-format, although they still don't fully specify our style, they're good enough to apply auto formatting. Don't be afraid to use the auto formatting on these files. If we see something that is really not according to our style, we can update those files accordingly. Step by step it will be a more uniform code base.
My IDE didn't do the formatting, but I had to use git filter branch
and git-clang-format
to pre-format my edit for minimizing conflicts during rebase. And i forgot to apply it one more time after rebase.
So this is your formatting on my edits, but with the original context/indentation. I noticed my other PR have this issues to. I'll fix that.
@jellespijker
I've applied your suggestion and resolved few warnings recently added.
To be clear this only covers -Wall -Wextra
. The EXTENSIVE_WARNINGS
cmake flag is way too verbose. Maybe it shouldn't be enabled by default?