Skip to content
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

Prevent FD_ZERO formatting from mangling by clang-format #437

Merged
merged 2 commits into from
Jan 23, 2021

Conversation

kazarmy
Copy link
Member

@kazarmy kazarmy commented Jan 23, 2021

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the documentation and the rizin book with the relevant information (if needed)

Detailed description

Both clang-format-10 and clang-format-11 cut the following statement into 2 lines

__FDS_BITS (__arr)[__i] = 0; \
so this pr adds parentheses to prevent the cutting.

Test plan

All builds are green. For some reason, changes to librz/include/sflib/common/sftypes.h do not trigger a meson rebuild.

Closing issues

...

@codecov-io
Copy link

codecov-io commented Jan 23, 2021

Codecov Report

Merging #437 (5c6ad1d) into dev (9eec27e) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #437      +/-   ##
==========================================
- Coverage   41.72%   41.72%   -0.01%     
==========================================
  Files         965      965              
  Lines      323070   323070              
==========================================
- Hits       134793   134792       -1     
- Misses     188277   188278       +1     
Impacted Files Coverage Δ
librz/util/intervaltree.c 94.51% <0.00%> (-0.58%) ⬇️
librz/util/pj.c 86.15% <0.00%> (-0.08%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9eec27e...5c6ad1d. Read the comment docs.

Copy link
Member

@thestr4ng3r thestr4ng3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to put // clang-format off/// clang-format on around it to prevent clang-format from re-doing the change the next time it is run.

@kazarmy
Copy link
Member Author

kazarmy commented Jan 23, 2021

Ok 5c6ad1d

@kazarmy kazarmy merged commit 631c55e into rizinorg:dev Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants