Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4057 +/- ##
==========================================
+ Coverage 90.45% 90.48% +0.02%
==========================================
Files 941 941
Lines 60390 60391 +1
Branches 1145 1145
==========================================
+ Hits 54628 54644 +16
+ Misses 5252 5241 -11
+ Partials 510 506 -4
🚀 New features to boost your workflow:
|
How? I'm maybe missing something obvious here, but none of I do agree that we probably have unused macro, tho. But I'm also unsure what are the drawback, if any, and how this new macro make things better. I may be lacking backgrounds on this (?) |
When I run make, I get this output: |
I'm using GCC since that's what comes with the I can confirm the warnings are present now I'm trying clang and the PR does a good job at removing them. I'm still unsure how useful it is to remove these warning for macro generated code. I.e., "yes", not all structures generated from macro has a usage of every function from the macro 🤷. IMO, a more useful to test if generated function are used by at least one structure, so we can mark it as dead code that should be removed. Quick note to open up the discussion: should we consider adding a workflow/matrix to test clang with our GitHub Actions workflow? I can see clang reveals some more additional warnings (I have not yet evaluated how useful they are). |
It might not be very useful after all. Clang isn't much better than GCC. As long as it ensures no warnings under the latest GCC, that's sufficient. |
As said in #4060 (comment), maybe this can be part of a wider work to enforce coding rules on the project and raise the code quality. |
|
i like the idea but the label not very clear, mb smth like |
actionless
left a comment
There was a problem hiding this comment.
see comment right above this
What do you think of the name |
|
sounds reasonable 😺👍 |
Many of our macro-generated functions are never used. This causes the compiler to generate warnings. Functions decorated with the mayused attribute can eliminate these warnings.
I felt the original “attribute unused” was unintuitive, so I renamed it to mayused, meaning “maybe used.”
“attribute unused” always gives the impression that the function is completely unusable.
array.h also needs modification. If this PR gets merged, I'll make the changes then.