-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
util: Add UTIL_LISTIFY test cases #13174
Conversation
All checks are passing now. Review history of this comment for details about previous failed status. |
Codecov Report
@@ Coverage Diff @@
## master #13174 +/- ##
==========================================
+ Coverage 48.75% 48.76% +0.01%
==========================================
Files 319 319
Lines 46871 46876 +5
Branches 10835 10840 +5
==========================================
+ Hits 22850 22861 +11
+ Misses 19394 19387 -7
- Partials 4627 4628 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An AFAICT equally[0] powerful mechanism is already present.
To reduce the amount of infrastructure, I believe it would be better to re-use what we have.
[0] Actually, more flexible, as it doesn't require ';' to separate each element and is therefore more re-usable than LOOP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems really clever. Random nitpikery.
there is |
Thanks for notice, I will try to use |
Please do post a PR if you can find a better description. |
Trivial syntax fix. Signed-off-by: Andrei Emeltchenko <[email protected]>
I started to use |
Yes it does, but this is an acceptable price to pay to not have to maintain two macros that nearly do the same thing.
What kind of warnings? |
Check warnings in this PR. |
Not sure how, "Details" doesn't give any more details. Anyhow, these macro's often violate the static analyzer's rules, I believe a maintainer usually ignores the rule and merges it anyway. EDIT: Maybe it is this: #13174 (comment) |
This error seems reasonable to me:
do { i += x; } while(0); |
-:10: WARNING:SINGLE_STATEMENT_DO_WHILE_MACRO: Single statement macros should not use a do {} while (0) loop |
Add tests for UTIL_LISTIFY macro. Signed-off-by: Andrei Emeltchenko <[email protected]>
Can't catch a break ... I don't know how to resolve the warnings. |
find first comment by zephyrbot, browse through the history of the comment. |
Added tests for UTIL_LISTIFY and corrected test name.