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

call_consensus_pileup.h: fix build failure with Gcc 12 #136

Merged
merged 1 commit into from
Jul 19, 2022

Commits on Jul 13, 2022

  1. call_consensus_pileup.h: fix ftbfs with Gcc 12

    Since Gcc 12, C string header has been removed from most standard C++
    includes.  This causes the following build error, initially reported
    in Debian [Bug#1012952]:
    
    	call_consensus_pileup.cpp:138:3: error: ‘strcpy’ was not declared in this scope
    
    Bringing back manually one of `cstring` or `string.h` inside the
    header `call_consensus_pileup.h` fixes the issue.
    
    The [original patch] brought in Debian applies to ivar release 1.3.1
    to correct the following symptom, but apparently the master branch
    diverged from the release, so the `delete[] files` fixing the issue
    below may not be needed, but I mention it anyway, just in case this
    were to be of interest:
    
    	ivar.cpp:487:14: error: ‘void operator delete(void*)’ called on pointer returned from a mismatched allocation function [-Werror=mismatched-new-delete]
    	  487 |       delete files;
    	      |              ^~~~~
    	ivar.cpp:467:33: note: returned from ‘void* operator new [](std::size_t)’
    	  467 |     char **files = new char*[100];
    	      |                                 ^
    
    [Bug#1012952]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012952
    [original patch]: https://sources.debian.org/src/ivar/1.3.1%2Bdfsg-5/debian/patches/gcc-12.patch/
    
    Signed-off-by: Étienne Mollier <emollier@debian.org>
    emollier committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    a5a6802 View commit details
    Browse the repository at this point in the history