CuraEngine icon indicating copy to clipboard operation
CuraEngine copied to clipboard

Fix warnings

Open Piezoid opened this issue 2 years ago • 4 comments

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.

Piezoid avatar Feb 17 '22 14:02 Piezoid

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?

Piezoid avatar Feb 17 '22 17:02 Piezoid

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.

jellespijker avatar Aug 09 '22 07:08 jellespijker

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.

Piezoid avatar Aug 09 '22 11:08 Piezoid

@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?

Piezoid avatar Aug 09 '22 20:08 Piezoid