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

fix GCC 10 compile issue [-Werror=mismatched-new-delete] #135

Closed
wants to merge 1 commit into from

Conversation

fizwit
Copy link

@fizwit fizwit commented Jul 12, 2022

fix issue #134 and #108

@fizwit
Copy link
Author

fizwit commented Jul 13, 2022

I can not reproduce the MacOS build error with Monterey 12.3.1

fizwit-MBP ivar % src/ivar version
iVar version 1.3.1

g++ --version
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@cmaceves cmaceves self-assigned this Jul 19, 2022
@cmaceves
Copy link
Collaborator

addressed in PR #136

@cmaceves cmaceves closed this Jul 19, 2022
@JacobHayes
Copy link

JacobHayes commented Oct 14, 2022

I don't think PR #136 covered this (only the call_consensus_pileup error), I'm still getting this issue as of bafc7b9. That PR does mention delete files, but as also noted master has diverged - indeed it now uses free(files). After making the change in this PR, I was able to compile again.

Can this be re-opened and merged? Thanks! I can put together a reproducible example if needed.

@@ -499,7 +499,7 @@ int main(int argc, char* argv[]){
for (int i = 0; i < nfiles; ++i) {
free(files[i]);
}
free(files);
delete(files);

Choose a reason for hiding this comment

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

I'm not very familiar with cpp, but iiuc delete is a keyword/operator (rather than a function) and since files is an array, I think we might want: delete [] files(?). I'll make a separate PR just in case it is helpful/quicker to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants