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 various GCC 13 warnings and errors #1067

Merged
merged 1 commit into from
Oct 30, 2023
Merged

Conversation

jmarshall
Copy link
Contributor

As noted in #1056 et al, on recent platforms ParseTools.cpp/.h fail to compile due to uint32_t not being declared. The obvious fix is to add #include <cstdint> but we can tidy things up a bit by fixing this differently. This PR fixes that build failure and also fixes several warnings encountered with GCC 13:

Due to improvements in system and/or compiler header cleanliness, where previously ParseTools.{cpp,h}'s headers have included <cstdint> as a byproduct, this no longer occurs. Hence:

  • Ordinary unsigned is appropriate for the int2str() variable anyway;
  • Get CHRPOS from BedtoolsTypes.h instead of typedeffing it ourselves;
  • ParseTools.cpp's isHeaderLine() does use uint32_t, so include <cstdint> from the .cpp file for good measure.

Other warnings:

  • Assignment operators should not be virtual (avoids "Record::operator= was hidden" warnings).
  • List member initialisers in the same order in which they are declared (avoids "_testLastQueryRec will be initialized after _runToDbEnd" warnings).

Fixes #1056. Closes #1045 and closes #1066.

Due to improvements in system and/or compiler header cleanliness,
where previously ParseTools.{cpp,h}'s headers have included <cstdint>
as a byproduct, this no longer occurs. Hence:
 - Ordinary unsigned is appropriate for the int2str() variable anyway;
 - Get CHRPOS from BedtoolsTypes.h instead of typedeffing it ourselves;
 - ParseTools.cpp's isHeaderLine() does use uint32_t, so include <cstdint>
   from the .cpp file for good measure.

Assignment operators should not be virtual (avoids "Record::operator=
was hidden" warnings). List member initialisers in the same order in
which they are declared (avoids "_testLastQueryRec will be initialized
after _runToDbEnd" warnings).
@arq5x
Copy link
Owner

arq5x commented Oct 30, 2023

This is fantastic! Thanks as always for your expert help, @jmarshall !

@arq5x arq5x merged commit 1bae92c into arq5x:master Oct 30, 2023
1 check passed
@SoapGentoo
Copy link

@arq5x could you please cut a new release so we can remove all the patches from our repos?

@arq5x
Copy link
Owner

arq5x commented Oct 31, 2023

Yes. It will take me a few days to a week or so because of deadlines, but I will.

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.

missing include statements
3 participants