Skip to content

Fix compiler warnings with newer gcc versions#261

Merged
holke merged 1 commit intodevelopfrom
fix-compiler_warnings_gcc8
Jul 12, 2022
Merged

Fix compiler warnings with newer gcc versions#261
holke merged 1 commit intodevelopfrom
fix-compiler_warnings_gcc8

Conversation

@holke
Copy link
Collaborator

@holke holke commented Jun 9, 2022

Describe your changes here:

Fixes compiler warnings that occur with gcc version 11.2.0.
This is the code part from previous PR #257 that we closed without merging.

All these boxes must be checked by the reviewers before merging the pull request:

  • The author added a BSD statement to doc/ (or already has one)

  • The code compiles without warning in debugging and release mode, with and without MPI (this should be executed automatically in a github action)

    If the Pull request indroduces code that is not covered by the github action (for example coupling with a new library):

    • Should this use case be added to the github action?
    • If not, does the specific use case compile and all tests pass (check manually)
  • All tests pass (in various configurations, this should be executed automatically in a github action)

  • New source/header files are properly added to the Makefiles

  • The reviewer executed the new code features at least once and checked the results manually

  • The code is covered in an existing or new test case

  • The code follows the t8code coding guidelines

  • The code is well documented

  • All function declarations, structs/classes and their members have a proper doxygen documentation

  • All new algorithms and data structures are sufficiently optimal in terms of memory and runtime (If this should be merged, but there is still potential for optimization, create a new issue)

  • Testing of this template: If you feel something is missing from this list, contact the developers

@sandro-elsweijer
Copy link
Member

@holke
Can you please elaborate which environment you use? I use gcc version 9.4.0 and the only warnings I get are from sc, p4est and vtk, but none from the compilation of the t8code source code. Therefore, there is also no difference in the make output between this branch and develop.

@holke
Copy link
Collaborator Author

holke commented Jun 13, 2022

@holke Can you please elaborate which environment you use? I use gcc version 9.4.0 and the only warnings I get are from sc, p4est and vtk, but none from the compilation of the t8code source code. Therefore, there is also no difference in the make output between this branch and develop.

I use an Ubuntu 22.04 with a gcc 11.2.0

gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@holke holke assigned sandro-elsweijer and unassigned holke Jun 13, 2022
@holke
Copy link
Collaborator Author

holke commented Jun 13, 2022

I think my comment regarding v >8 was misleading. The autotool errors from the PR before occur from v.8 on, that was my confusion.

Copy link
Member

@sandro-elsweijer sandro-elsweijer left a comment

Choose a reason for hiding this comment

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

Even with Ubuntu 22.04 jammy and gcc 11.2.0 I get no warnings. But even though I can't reproduce these warnings, the changes improve the overall usability of the functions and lgtm.

@holke holke merged commit d025b43 into develop Jul 12, 2022
@holke holke deleted the fix-compiler_warnings_gcc8 branch July 12, 2022 13:47
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