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

Add Coccinelle rules - bitmap set operations #6265

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

jnidzwetzki
Copy link
Contributor

Some bitmap set operations recycle one of the input parameters or return a reference to a new bitmap set. The added set of rules checks that the returned reference is not discarded.


Example output

-	bms_del_member(chunk_state->unused_batch_states, next_free_batch);
+	/* Result of bms_del_member has to be used */
+	chunk_state->unused_batch_states = bms_del_member(chunk_state->unused_batch_states,
+							  next_free_batch);
 

Disable-check: force-changelog-file
Should be merged after: #6264

Copy link

github-actions bot commented Nov 3, 2023

@nikkhils, @mkindahl: please review this pull request.

Powered by pull-review

Copy link
Contributor

@mkindahl mkindahl left a comment

Choose a reason for hiding this comment

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

Seems like a reasonable check except that there is no guarantee that the result should be stored in E1, but since this just creates a diff, it should demonstrate the problem.

Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Merging #6265 (8ef88fb) into main (7f25cd9) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #6265      +/-   ##
==========================================
- Coverage   65.28%   65.26%   -0.02%     
==========================================
  Files         247      247              
  Lines       57486    57440      -46     
  Branches    12776    12757      -19     
==========================================
- Hits        37531    37491      -40     
- Misses      18068    18081      +13     
+ Partials     1887     1868      -19     

see 65 files with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Some bitmap set operations recycle one of the input parameters or return
a reference to a new bitmap set. The added set of rules checks that the
returned reference is not discarded.
@jnidzwetzki jnidzwetzki enabled auto-merge (rebase) November 3, 2023 09:46
@jnidzwetzki jnidzwetzki merged commit 7f4f23b into timescale:main Nov 3, 2023
35 checks passed
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