Skip to content

Remove bgzf_flush#37

Merged
ANGSD merged 1 commit into
metaDMG-dev:masterfrom
fgvieira:bgzf_flush
Jun 25, 2025
Merged

Remove bgzf_flush#37
ANGSD merged 1 commit into
metaDMG-dev:masterfrom
fgvieira:bgzf_flush

Conversation

@fgvieira

@fgvieira fgvieira commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator

Remove unnecessary bgzf_flush, since it is already called in bgzf_close and triggers a warning:

main_dfit.cpp: In function 'int main_dfit(int, char**)':
main_dfit.cpp:895:15: warning: ignoring return value of 'int bgzf_flush(BGZF*)' declared with attribute 'warn_unused_result' [-Wunused-result]
  895 |     bgzf_flush(fpfpfp);//<- is flush needed?
      |     ~~~~~~~~~~^~~~~~~~
main_dfit.cpp:905:17: warning: ignoring return value of 'int bgzf_flush(BGZF*)' declared with attribute 'warn_unused_result' [-Wunused-result]
  905 |       bgzf_flush(bootfp);//<- is flush needed?
      |       ~~~~~~~~~~^~~~~~~~

@ANGSD

ANGSD commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator

I only think flush is needed when using the peek

@ANGSD
ANGSD merged commit 6d83852 into metaDMG-dev:master Jun 25, 2025
1 check passed
@fgvieira
fgvieira deleted the bgzf_flush branch June 26, 2025 07:19
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.

2 participants