lanl / vpic

Vector Particle-In-Cell (VPIC) Project
Other
152 stars 76 forks source link

Fix warnings #125

Closed agseaton closed 4 years ago

agseaton commented 4 years ago

This pull request fixes a couple of bugs and eliminates many of the warnings that I've been getting from gcc 9.3 and clang 10. The warning options I've used are "-Wall -Wextra -Wpedantic". See the commit messages for more details. The intention with this is not to remove warnings for the sake of it, but hopefully to improve the code by eliminating potential bugs, and making it more readable and standard compliant.

Someone who understands it better than me should check the 'correction' I made to the hard sphere and large angle Coulomb methods (commit e53ffd5). From looking at the code it looked like an obvious mistake but may be intentional, in which case the code should be changed to make the intention clear.

There are still several warnings that are printed, mostly relating to unused parameters in function calls. I've not thought of a good way of handling those, and since they are not actual bugs didn't want to change anything.

codecov[bot] commented 4 years ago

Codecov Report

Merging #125 into devel will increase coverage by 0.04%. The diff coverage is 78.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel     #125      +/-   ##
==========================================
+ Coverage   83.10%   83.15%   +0.04%     
==========================================
  Files         118      118              
  Lines        7287     7267      -20     
  Branches     1124     1120       -4     
==========================================
- Hits         6056     6043      -13     
+ Misses        754      752       -2     
+ Partials      477      472       -5     
Impacted Files Coverage Δ
src/collision/pipeline/takizuka_abe_pipeline.cc 63.23% <ø> (ø)
src/sf_interface/pipeline/reduce_array_pipeline.cc 74.41% <ø> (ø)
...cies_advance/standard/pipeline/hydro_p_pipeline.cc 98.01% <ø> (-0.06%) :arrow_down:
src/util/util_base.cc 58.51% <ø> (-0.87%) :arrow_down:
src/vpic/dump.cc 68.73% <ø> (ø)
test/integrated/collision/test_collision.deck 86.40% <0.00%> (+0.73%) :arrow_up:
test/unit/energy_comparison/compare_energies.h 74.77% <ø> (ø)
...st/integrated/to_completion/reconnection_test.deck 96.35% <100.00%> (ø)
test/unit/energy_comparison/3d_test.cc 97.98% <100.00%> (ø)
test/unit/energy_comparison/weibel_driver.cc 98.00% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ee3ae53...e53ffd5. Read the comment docs.