From 8ba183aee5a6ee7cb983620d3e54142d1a13536d Mon Sep 17 00:00:00 2001 From: Roland Schulz Date: Wed, 18 Jul 2018 01:21:45 -0700 Subject: [PATCH] clang-tidy modernize avoid-bind (no changes) redundant-void-arg use-bool-literals For deprecated-headers the changes are made in the cpp files but the check isn't enabled. It isn't possible to enable it only for source files but not header files and some of our headers still need to compile with a C compiler for the nonbonded kernels. Once those are removed the check should be enabled. Change-Id: I7316b9bbffaf8842fecc40327543397984f75f5c --- src/.clang-tidy | 2 + src/gromacs/awh/awh.cpp | 3 +- src/gromacs/awh/bias.cpp | 3 +- src/gromacs/awh/biasstate.cpp | 3 +- src/gromacs/awh/biaswriter.cpp | 3 +- src/gromacs/awh/correlationhistory.cpp | 2 +- src/gromacs/awh/correlationtensor.cpp | 2 +- src/gromacs/awh/grid.cpp | 3 +- src/gromacs/correlationfunctions/autocorr.cpp | 5 +- src/gromacs/correlationfunctions/expfit.cpp | 2 +- .../correlationfunctions/integrate.cpp | 5 +- src/gromacs/domdec/domdec.cpp | 11 ++-- src/gromacs/domdec/domdec_constraints.cpp | 2 +- src/gromacs/domdec/domdec_network.cpp | 2 +- src/gromacs/domdec/domdec_setup.cpp | 5 +- src/gromacs/domdec/domdec_specatomcomm.cpp | 2 +- src/gromacs/domdec/domdec_topology.cpp | 6 +-- src/gromacs/domdec/domdec_vsite.cpp | 2 +- src/gromacs/essentialdynamics/edsam.cpp | 7 ++- src/gromacs/ewald/ewald.cpp | 3 +- src/gromacs/ewald/pme-load-balancing.cpp | 3 +- src/gromacs/ewald/pme-only.cpp | 9 ++-- src/gromacs/ewald/pme-pp.cpp | 3 +- src/gromacs/ewald/pme-spread.cpp | 2 +- src/gromacs/ewald/pme.cpp | 9 ++-- src/gromacs/fft/fft.cpp | 10 ++-- src/gromacs/fft/fft5d.cpp | 11 ++-- src/gromacs/fft/fft_fftw3.cpp | 4 +- src/gromacs/fft/parallel_3dfft.cpp | 6 +-- src/gromacs/fileio/gmxfio.cpp | 6 +-- src/gromacs/fileio/gmxfio.h | 2 +- src/gromacs/fileio/libxdrf.cpp | 52 +++++++++---------- src/gromacs/fileio/tpxio.cpp | 2 +- src/gromacs/fileio/vmdio.cpp | 22 ++++---- src/gromacs/gmxana/gmx_awh.cpp | 2 +- src/gromacs/gmxana/gmx_bar.cpp | 2 +- src/gromacs/gmxana/gmx_densorder.cpp | 2 +- src/gromacs/gmxana/gmx_disre.cpp | 2 +- src/gromacs/gmxana/gmx_hbond.cpp | 2 +- src/gromacs/gmxana/gmx_make_edi.cpp | 2 +- src/gromacs/gmxana/gmx_msd.cpp | 2 +- src/gromacs/gmxana/gmx_potential.cpp | 2 +- src/gromacs/gmxana/gmx_trjconv.cpp | 3 +- src/gromacs/gmxana/gmx_wham.cpp | 6 +-- src/gromacs/gmxlib/network.h | 2 +- .../nb_kernel_c/nb_kernel_allvsall.cpp | 2 +- src/gromacs/gmxpreprocess/add_par.cpp | 2 +- src/gromacs/gmxpreprocess/convparm.cpp | 3 +- src/gromacs/gmxpreprocess/fflibutil.cpp | 2 +- src/gromacs/gmxpreprocess/gen_ad.cpp | 7 ++- src/gromacs/gmxpreprocess/gen_vsite.cpp | 7 ++- src/gromacs/gmxpreprocess/genhydro.cpp | 4 +- src/gromacs/gmxpreprocess/gmxcpp.cpp | 29 +++-------- src/gromacs/gmxpreprocess/gpp_atomtype.cpp | 5 +- src/gromacs/gmxpreprocess/gpp_atomtype.h | 2 +- .../gmxpreprocess/gpp_bond_atomtype.cpp | 4 +- src/gromacs/gmxpreprocess/gpp_bond_atomtype.h | 4 +- src/gromacs/gmxpreprocess/gpp_nextnb.cpp | 2 +- src/gromacs/gmxpreprocess/grompp.cpp | 7 ++- src/gromacs/gmxpreprocess/h_db.cpp | 4 +- src/gromacs/gmxpreprocess/hackblock.cpp | 2 +- src/gromacs/gmxpreprocess/hizzie.cpp | 5 +- src/gromacs/gmxpreprocess/nm2type.cpp | 2 +- src/gromacs/gmxpreprocess/pdb2gmx.cpp | 8 +-- src/gromacs/gmxpreprocess/pdb2top.cpp | 7 ++- src/gromacs/gmxpreprocess/pgutil.cpp | 2 +- src/gromacs/gmxpreprocess/readir.cpp | 7 ++- src/gromacs/gmxpreprocess/readpull.cpp | 6 +-- src/gromacs/gmxpreprocess/resall.cpp | 6 +-- src/gromacs/gmxpreprocess/solvate.cpp | 2 +- src/gromacs/gmxpreprocess/specbond.cpp | 7 ++- src/gromacs/gmxpreprocess/specbond.h | 2 +- src/gromacs/gmxpreprocess/ter_db.cpp | 4 +- src/gromacs/gmxpreprocess/tomorse.cpp | 7 ++- src/gromacs/gmxpreprocess/topdirs.cpp | 4 +- src/gromacs/gmxpreprocess/topio.cpp | 11 ++-- src/gromacs/gmxpreprocess/toppush.cpp | 5 +- src/gromacs/gmxpreprocess/topshake.cpp | 3 +- src/gromacs/gmxpreprocess/toputil.cpp | 3 +- src/gromacs/gmxpreprocess/vsite_parm.cpp | 5 +- src/gromacs/gmxpreprocess/xlate.cpp | 4 +- src/gromacs/imd/imd.cpp | 4 +- src/gromacs/imd/imdsocket.cpp | 6 +-- src/gromacs/listed-forces/listed-forces.cpp | 2 +- .../listed-forces/manage-threading.cpp | 6 +-- .../listed-forces/position-restraints.cpp | 3 +- src/gromacs/math/3dtransforms.cpp | 5 +- src/gromacs/math/do_fit.cpp | 3 +- src/gromacs/math/units.cpp | 4 +- src/gromacs/math/utilities.cpp | 5 +- src/gromacs/mdlib/broadcaststructs.cpp | 2 +- src/gromacs/mdlib/calc_verletbuf.cpp | 5 +- src/gromacs/mdlib/calcmu.cpp | 4 +- src/gromacs/mdlib/compute_io.cpp | 6 +-- src/gromacs/mdlib/constr.cpp | 5 +- src/gromacs/mdlib/coupling.cpp | 3 +- src/gromacs/mdlib/ebin.cpp | 5 +- src/gromacs/mdlib/ebin.h | 2 +- src/gromacs/mdlib/expanded.cpp | 3 +- src/gromacs/mdlib/force.cpp | 5 +- src/gromacs/mdlib/forcerec.cpp | 9 ++-- src/gromacs/mdlib/forcerec.h | 2 +- src/gromacs/mdlib/lincs.cpp | 5 +- src/gromacs/mdlib/mdebin.cpp | 6 +-- src/gromacs/mdlib/mdebin_bar.cpp | 5 +- src/gromacs/mdlib/membed.cpp | 4 +- src/gromacs/mdlib/nbnxn_atomdata.cpp | 9 ++-- src/gromacs/mdlib/nbnxn_grid.cpp | 3 +- .../mdlib/nbnxn_kernels/nbnxn_kernel_ref.cpp | 3 +- src/gromacs/mdlib/nbnxn_search.cpp | 5 +- src/gromacs/mdlib/nbnxn_tuning.cpp | 5 +- src/gromacs/mdlib/ns.cpp | 5 +- src/gromacs/mdlib/nsgrid.cpp | 5 +- src/gromacs/mdlib/qm_orca.cpp | 7 ++- src/gromacs/mdlib/qmmm.cpp | 9 ++-- src/gromacs/mdlib/qmmm.h | 2 +- src/gromacs/mdlib/rbin.cpp | 2 +- src/gromacs/mdlib/rbin.h | 2 +- src/gromacs/mdlib/settle.cpp | 5 +- src/gromacs/mdlib/shellfc.cpp | 5 +- src/gromacs/mdlib/sighandler.cpp | 8 +-- src/gromacs/mdlib/sighandler.h | 10 ++-- src/gromacs/mdlib/sim_util.cpp | 5 +- src/gromacs/mdlib/stat.cpp | 4 +- src/gromacs/mdlib/update.cpp | 3 +- src/gromacs/mdlib/vsite.cpp | 2 +- src/gromacs/mdlib/wall.cpp | 2 +- src/gromacs/mdlib/wnblist.cpp | 4 +- src/gromacs/mdrun/md.cpp | 5 +- src/gromacs/mdrunutility/handlerestart.cpp | 2 +- src/gromacs/mdtypes/df_history.cpp | 6 +-- src/gromacs/pbcutil/mshift.cpp | 2 +- src/gromacs/pbcutil/pbc.h | 2 +- src/gromacs/pbcutil/rmpbc.cpp | 5 +- src/gromacs/pulling/pull.cpp | 9 ++-- src/gromacs/pulling/pull_rotation.cpp | 6 +-- src/gromacs/pulling/pullutil.cpp | 4 +- src/gromacs/selection/compiler.cpp | 3 +- src/gromacs/selection/evaluate.cpp | 2 +- src/gromacs/selection/mempool.cpp | 2 +- src/gromacs/selection/parser.h | 2 +- src/gromacs/selection/parser.patch | 11 ++++ src/gromacs/selection/parsetree.cpp | 4 +- src/gromacs/selection/poscalc.cpp | 2 +- src/gromacs/selection/position.cpp | 4 +- src/gromacs/selection/regenerate_parser.sh | 2 +- src/gromacs/selection/scanner_internal.cpp | 4 +- src/gromacs/selection/selmethod.cpp | 4 +- src/gromacs/selection/sm_same.cpp | 4 +- src/gromacs/swap/swapcoords.cpp | 6 +-- src/gromacs/taskassignment/decidegpuusage.cpp | 4 +- .../taskassignment/resourcedivision.cpp | 4 +- src/gromacs/timing/cyclecounter.h | 6 +-- src/gromacs/timing/wallcycle.cpp | 2 +- src/gromacs/timing/wallcycle.h | 2 +- src/gromacs/topology/atomprop.cpp | 7 ++- src/gromacs/topology/block.cpp | 2 +- src/gromacs/topology/block.h | 2 +- src/gromacs/topology/index.cpp | 8 +-- src/gromacs/topology/mtop_util.cpp | 10 ++-- src/gromacs/topology/symtab.cpp | 6 +-- src/gromacs/topology/topsort.cpp | 2 +- .../modules/surfacearea.cpp | 7 ++- .../trajectoryanalysis/runnercommon.cpp | 2 +- src/gromacs/utility/basenetwork.cpp | 2 +- src/gromacs/utility/baseversion.h | 8 +-- src/gromacs/utility/bitmask.h | 6 +-- src/gromacs/utility/compare.cpp | 16 ------ src/gromacs/utility/coolstuff.cpp | 2 +- src/gromacs/utility/cstringutil.cpp | 5 +- src/gromacs/utility/futil.cpp | 10 ++-- src/gromacs/utility/futil.h | 2 +- src/gromacs/utility/gmxomp.cpp | 6 +-- src/gromacs/utility/smalloc.cpp | 6 +-- src/gromacs/utility/stringutil.cpp | 4 +- src/gromacs/utility/sysinfo.cpp | 6 +-- src/gromacs/utility/sysinfo.h | 6 +-- 177 files changed, 395 insertions(+), 480 deletions(-) diff --git a/src/.clang-tidy b/src/.clang-tidy index 0565928801..95f603173a 100644 --- a/src/.clang-tidy +++ b/src/.clang-tidy @@ -4,6 +4,8 @@ Checks: clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-security.insecureAP -readability-function-size,-readability-else-after-return, modernize-use-nullptr,modernize-use-emplace, modernize-make-unique,modernize-make-shared, + modernize-avoid-bind, + modernize-redundant-void-arg,modernize-use-bool-literals, cppcoreguidelines-*,-cppcoreguidelines-pro-*,-cppcoreguidelines-owning-memory, -cppcoreguidelines-no-malloc,-cppcoreguidelines-special-member-functions, google-*,-google-build-using-namespace,-google-explicit-constructor, diff --git a/src/gromacs/awh/awh.cpp b/src/gromacs/awh/awh.cpp index 95bca480dd..c503de4e48 100644 --- a/src/gromacs/awh/awh.cpp +++ b/src/gromacs/awh/awh.cpp @@ -46,8 +46,7 @@ #include "awh.h" -#include - +#include #include #include #include diff --git a/src/gromacs/awh/bias.cpp b/src/gromacs/awh/bias.cpp index be165c0ca9..27167183d7 100644 --- a/src/gromacs/awh/bias.cpp +++ b/src/gromacs/awh/bias.cpp @@ -46,8 +46,7 @@ #include "bias.h" -#include - +#include #include #include #include diff --git a/src/gromacs/awh/biasstate.cpp b/src/gromacs/awh/biasstate.cpp index 173f095637..633f045c74 100644 --- a/src/gromacs/awh/biasstate.cpp +++ b/src/gromacs/awh/biasstate.cpp @@ -46,8 +46,7 @@ #include "biasstate.h" -#include - +#include #include #include #include diff --git a/src/gromacs/awh/biaswriter.cpp b/src/gromacs/awh/biaswriter.cpp index 57a635e03e..cc45086a6e 100644 --- a/src/gromacs/awh/biaswriter.cpp +++ b/src/gromacs/awh/biaswriter.cpp @@ -37,8 +37,7 @@ #include "biaswriter.h" -#include - +#include #include #include "gromacs/awh/awh.h" diff --git a/src/gromacs/awh/correlationhistory.cpp b/src/gromacs/awh/correlationhistory.cpp index 18287c7ef1..47ecb44a27 100644 --- a/src/gromacs/awh/correlationhistory.cpp +++ b/src/gromacs/awh/correlationhistory.cpp @@ -47,7 +47,7 @@ #include "correlationhistory.h" -#include +#include #include "gromacs/gmxlib/network.h" #include "gromacs/mdtypes/awh-correlation-history.h" diff --git a/src/gromacs/awh/correlationtensor.cpp b/src/gromacs/awh/correlationtensor.cpp index f847e57a15..e1e973963a 100644 --- a/src/gromacs/awh/correlationtensor.cpp +++ b/src/gromacs/awh/correlationtensor.cpp @@ -46,7 +46,7 @@ #include "correlationtensor.h" -#include +#include #include "gromacs/math/functions.h" #include "gromacs/math/utilities.h" diff --git a/src/gromacs/awh/grid.cpp b/src/gromacs/awh/grid.cpp index 2aae84c0c5..243c1639c8 100644 --- a/src/gromacs/awh/grid.cpp +++ b/src/gromacs/awh/grid.cpp @@ -46,8 +46,7 @@ #include "grid.h" -#include - +#include #include #include diff --git a/src/gromacs/correlationfunctions/autocorr.cpp b/src/gromacs/correlationfunctions/autocorr.cpp index 63560a924a..0f0a88ec2d 100644 --- a/src/gromacs/correlationfunctions/autocorr.cpp +++ b/src/gromacs/correlationfunctions/autocorr.cpp @@ -45,10 +45,9 @@ #include "autocorr.h" -#include -#include - #include +#include +#include #include diff --git a/src/gromacs/correlationfunctions/expfit.cpp b/src/gromacs/correlationfunctions/expfit.cpp index b8c3176c17..a1bfe445be 100644 --- a/src/gromacs/correlationfunctions/expfit.cpp +++ b/src/gromacs/correlationfunctions/expfit.cpp @@ -46,7 +46,7 @@ #include "expfit.h" -#include +#include #include diff --git a/src/gromacs/correlationfunctions/integrate.cpp b/src/gromacs/correlationfunctions/integrate.cpp index 5bb256f686..1180469ea9 100644 --- a/src/gromacs/correlationfunctions/integrate.cpp +++ b/src/gromacs/correlationfunctions/integrate.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -43,9 +43,8 @@ #include "integrate.h" -#include - #include +#include #include "gromacs/math/functions.h" #include "gromacs/math/vec.h" diff --git a/src/gromacs/domdec/domdec.cpp b/src/gromacs/domdec/domdec.cpp index 2f4ed89c13..58ce797fb5 100644 --- a/src/gromacs/domdec/domdec.cpp +++ b/src/gromacs/domdec/domdec.cpp @@ -39,13 +39,12 @@ #include "config.h" -#include -#include -#include -#include -#include - +#include +#include #include +#include +#include +#include #include diff --git a/src/gromacs/domdec/domdec_constraints.cpp b/src/gromacs/domdec/domdec_constraints.cpp index 89d289ecbf..92c32eff4e 100644 --- a/src/gromacs/domdec/domdec_constraints.cpp +++ b/src/gromacs/domdec/domdec_constraints.cpp @@ -46,7 +46,7 @@ #include "domdec_constraints.h" -#include +#include #include diff --git a/src/gromacs/domdec/domdec_network.cpp b/src/gromacs/domdec/domdec_network.cpp index 33d56bcc7d..31bacdc185 100644 --- a/src/gromacs/domdec/domdec_network.cpp +++ b/src/gromacs/domdec/domdec_network.cpp @@ -48,7 +48,7 @@ #include "config.h" -#include +#include #include "gromacs/domdec/domdec_struct.h" #include "gromacs/utility/gmxmpi.h" diff --git a/src/gromacs/domdec/domdec_setup.cpp b/src/gromacs/domdec/domdec_setup.cpp index 91d74d3d09..e6766d9c8a 100644 --- a/src/gromacs/domdec/domdec_setup.cpp +++ b/src/gromacs/domdec/domdec_setup.cpp @@ -44,10 +44,9 @@ #include "gmxpre.h" -#include -#include - +#include #include +#include #include "gromacs/domdec/domdec.h" #include "gromacs/domdec/domdec_struct.h" diff --git a/src/gromacs/domdec/domdec_specatomcomm.cpp b/src/gromacs/domdec/domdec_specatomcomm.cpp index 4dad4aa82c..8707dfd066 100644 --- a/src/gromacs/domdec/domdec_specatomcomm.cpp +++ b/src/gromacs/domdec/domdec_specatomcomm.cpp @@ -46,7 +46,7 @@ #include "domdec_specatomcomm.h" -#include +#include #include diff --git a/src/gromacs/domdec/domdec_topology.cpp b/src/gromacs/domdec/domdec_topology.cpp index 11c27fad03..79b9d00790 100644 --- a/src/gromacs/domdec/domdec_topology.cpp +++ b/src/gromacs/domdec/domdec_topology.cpp @@ -45,11 +45,9 @@ #include "gmxpre.h" -#include -#include -#include - #include +#include +#include #include #include diff --git a/src/gromacs/domdec/domdec_vsite.cpp b/src/gromacs/domdec/domdec_vsite.cpp index f0812f965c..d2a31da4e6 100644 --- a/src/gromacs/domdec/domdec_vsite.cpp +++ b/src/gromacs/domdec/domdec_vsite.cpp @@ -46,7 +46,7 @@ #include "domdec_vsite.h" -#include +#include #include diff --git a/src/gromacs/essentialdynamics/edsam.cpp b/src/gromacs/essentialdynamics/edsam.cpp index f242839feb..2eb01c63f1 100644 --- a/src/gromacs/essentialdynamics/edsam.cpp +++ b/src/gromacs/essentialdynamics/edsam.cpp @@ -38,11 +38,10 @@ #include "edsam.h" -#include -#include -#include - #include +#include +#include +#include #include "gromacs/commandline/filenm.h" #include "gromacs/compat/make_unique.h" diff --git a/src/gromacs/ewald/ewald.cpp b/src/gromacs/ewald/ewald.cpp index 92603997b3..696a47c9d3 100644 --- a/src/gromacs/ewald/ewald.cpp +++ b/src/gromacs/ewald/ewald.cpp @@ -49,9 +49,8 @@ #include "ewald.h" -#include - #include +#include #include #include diff --git a/src/gromacs/ewald/pme-load-balancing.cpp b/src/gromacs/ewald/pme-load-balancing.cpp index 971a47e3e5..fbc46a11ff 100644 --- a/src/gromacs/ewald/pme-load-balancing.cpp +++ b/src/gromacs/ewald/pme-load-balancing.cpp @@ -45,8 +45,7 @@ #include "pme-load-balancing.h" -#include - +#include #include #include diff --git a/src/gromacs/ewald/pme-only.cpp b/src/gromacs/ewald/pme-only.cpp index b3119b843c..84d49269dd 100644 --- a/src/gromacs/ewald/pme-only.cpp +++ b/src/gromacs/ewald/pme-only.cpp @@ -61,12 +61,11 @@ #include "config.h" -#include -#include -#include -#include - +#include #include +#include +#include +#include #include #include diff --git a/src/gromacs/ewald/pme-pp.cpp b/src/gromacs/ewald/pme-pp.cpp index eaa7339ab7..fcad69f0af 100644 --- a/src/gromacs/ewald/pme-pp.cpp +++ b/src/gromacs/ewald/pme-pp.cpp @@ -48,8 +48,7 @@ #include "config.h" -#include - +#include #include #include "gromacs/domdec/domdec.h" diff --git a/src/gromacs/ewald/pme-spread.cpp b/src/gromacs/ewald/pme-spread.cpp index ff71c7fd87..6ee5381967 100644 --- a/src/gromacs/ewald/pme-spread.cpp +++ b/src/gromacs/ewald/pme-spread.cpp @@ -40,7 +40,7 @@ #include "config.h" -#include +#include #include diff --git a/src/gromacs/ewald/pme.cpp b/src/gromacs/ewald/pme.cpp index 5ca669b0bb..f4433a432e 100644 --- a/src/gromacs/ewald/pme.cpp +++ b/src/gromacs/ewald/pme.cpp @@ -73,12 +73,11 @@ #include "config.h" -#include -#include -#include -#include - +#include #include +#include +#include +#include #include #include diff --git a/src/gromacs/fft/fft.cpp b/src/gromacs/fft/fft.cpp index 53434e6453..849947d9df 100644 --- a/src/gromacs/fft/fft.cpp +++ b/src/gromacs/fft/fft.cpp @@ -2,7 +2,7 @@ * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 1991-2003 Erik Lindahl, David van der Spoel, University of Groningen. - * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -39,10 +39,10 @@ #include "config.h" -#include -#include -#include -#include +#include +#include +#include +#include #include "gromacs/math/gmxcomplex.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/fft/fft5d.cpp b/src/gromacs/fft/fft5d.cpp index fa725120ba..3e0cb78577 100644 --- a/src/gromacs/fft/fft5d.cpp +++ b/src/gromacs/fft/fft5d.cpp @@ -38,13 +38,12 @@ #include "config.h" -#include -#include -#include -#include -#include - +#include +#include #include +#include +#include +#include #include diff --git a/src/gromacs/fft/fft_fftw3.cpp b/src/gromacs/fft/fft_fftw3.cpp index 4b741a379f..155ca0dcfa 100644 --- a/src/gromacs/fft/fft_fftw3.cpp +++ b/src/gromacs/fft/fft_fftw3.cpp @@ -37,8 +37,8 @@ #include "config.h" -#include -#include +#include +#include #include diff --git a/src/gromacs/fft/parallel_3dfft.cpp b/src/gromacs/fft/parallel_3dfft.cpp index f32feca9a5..ed904312e6 100644 --- a/src/gromacs/fft/parallel_3dfft.cpp +++ b/src/gromacs/fft/parallel_3dfft.cpp @@ -37,9 +37,9 @@ #include "parallel_3dfft.h" -#include -#include -#include +#include +#include +#include #include "gromacs/fft/fft.h" #include "gromacs/fft/fft5d.h" diff --git a/src/gromacs/fileio/gmxfio.cpp b/src/gromacs/fileio/gmxfio.cpp index 190a521c2a..4a2102df74 100644 --- a/src/gromacs/fileio/gmxfio.cpp +++ b/src/gromacs/fileio/gmxfio.cpp @@ -115,7 +115,7 @@ void gmx_fio_unlock(t_fileio *fio) } /* make a dummy head element, assuming we locked everything. */ -static void gmx_fio_make_dummy(void) +static void gmx_fio_make_dummy() { if (!open_files) { @@ -197,7 +197,7 @@ static void gmx_fio_remove(t_fileio *fio) /* get the first open file, or NULL if there is none. Returns a locked fio. Assumes open_files_mutex is locked. */ -static t_fileio *gmx_fio_get_first(void) +static t_fileio *gmx_fio_get_first() { t_fileio *ret; @@ -685,7 +685,7 @@ int gmx_fio_fsync(t_fileio *fio) -t_fileio *gmx_fio_all_output_fsync(void) +t_fileio *gmx_fio_all_output_fsync() { t_fileio *ret = nullptr; t_fileio *cur; diff --git a/src/gromacs/fileio/gmxfio.h b/src/gromacs/fileio/gmxfio.h index a94f7d8630..9efc463c89 100644 --- a/src/gromacs/fileio/gmxfio.h +++ b/src/gromacs/fileio/gmxfio.h @@ -153,7 +153,7 @@ struct gmx_file_position_t * we can truncate output files upon restart-with-appending. */ std::vector gmx_fio_get_output_file_positions(); -t_fileio *gmx_fio_all_output_fsync(void); +t_fileio *gmx_fio_all_output_fsync(); /* fsync all open output files. This is used for checkpointing, where we need to ensure that all output is actually written out to disk. diff --git a/src/gromacs/fileio/libxdrf.cpp b/src/gromacs/fileio/libxdrf.cpp index a5e35d94e2..c6be3354de 100644 --- a/src/gromacs/fileio/libxdrf.cpp +++ b/src/gromacs/fileio/libxdrf.cpp @@ -1111,7 +1111,7 @@ xtc_get_next_frame_number(FILE *fp, XDR *xdrs, int natoms) /* read one int just to make sure we dont read this frame but the next */ xdr_int(xdrs, &step); - while (1) + while (true) { ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time); if (ret == 1) @@ -1140,7 +1140,7 @@ static float xtc_get_next_frame_time(FILE *fp, XDR *xdrs, int natoms, float time; int step; int ret; - *bOK = 0; + *bOK = false; if ((off = gmx_ftell(fp)) < 0) { @@ -1148,15 +1148,15 @@ static float xtc_get_next_frame_time(FILE *fp, XDR *xdrs, int natoms, } /* read one int just to make sure we dont read this frame but the next */ xdr_int(xdrs, &step); - while (1) + while (true) { ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time); if (ret == 1) { - *bOK = 1; + *bOK = true; if (gmx_fseek(fp, off, SEEK_SET)) { - *bOK = 0; + *bOK = false; return -1; } return time; @@ -1180,22 +1180,22 @@ xtc_get_current_frame_time(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK) int step; float time; int ret; - *bOK = 0; + *bOK = false; if ((off = gmx_ftell(fp)) < 0) { return -1; } - while (1) + while (true) { ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time); if (ret == 1) { - *bOK = 1; + *bOK = true; if (gmx_fseek(fp, off, SEEK_SET)) { - *bOK = 0; + *bOK = false; return -1; } return time; @@ -1227,7 +1227,7 @@ xtc_get_current_frame_number(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK) int ret; int step; float time; - *bOK = 0; + *bOK = false; if ((off = gmx_ftell(fp)) < 0) { @@ -1235,15 +1235,15 @@ xtc_get_current_frame_number(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK) } - while (1) + while (true) { ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time); if (ret == 1) { - *bOK = 1; + *bOK = true; if (gmx_fseek(fp, off, SEEK_SET)) { - *bOK = 0; + *bOK = false; return -1; } return step; @@ -1278,7 +1278,7 @@ static gmx_off_t xtc_get_next_frame_start(FILE *fp, XDR *xdrs, int natoms) float time; /* read one int just to make sure we dont read this frame but the next */ xdr_int(xdrs, &step); - while (1) + while (true) { ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time); if (ret == 1) @@ -1308,7 +1308,7 @@ xdr_xtc_estimate_dt(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK) float tinit; gmx_off_t off; - *bOK = 0; + *bOK = false; if ((off = gmx_ftell(fp)) < 0) { return -1; @@ -1331,7 +1331,7 @@ xdr_xtc_estimate_dt(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK) res -= tinit; if (0 != gmx_fseek(fp, off, SEEK_SET)) { - *bOK = 0; + *bOK = false; return -1; } return res; @@ -1367,7 +1367,7 @@ xdr_xtc_seek_frame(int frame, FILE *fp, XDR *xdrs, int natoms) return -1; } - while (1) + while (true) { fr = xtc_get_next_frame_number(fp, xdrs, natoms); if (fr < 0) @@ -1466,7 +1466,7 @@ int xdr_xtc_seek_time(real time, FILE *fp, XDR *xdrs, int natoms, gmx_bool bSeek } */ - while (1) + while (true) { dt = xdr_xtc_estimate_dt(fp, xdrs, natoms, &bOK); if (!bOK) @@ -1590,17 +1590,17 @@ xdr_xtc_get_last_frame_time(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK) { float time; gmx_off_t off; - *bOK = 1; + *bOK = true; off = gmx_ftell(fp); if (off < 0) { - *bOK = 0; + *bOK = false; return -1; } if (gmx_fseek(fp, -3*XDR_INT_SIZE, SEEK_END) != 0) { - *bOK = 0; + *bOK = false; return -1; } @@ -1612,7 +1612,7 @@ xdr_xtc_get_last_frame_time(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK) if (gmx_fseek(fp, off, SEEK_SET) != 0) { - *bOK = 0; + *bOK = false; return -1; } return time; @@ -1624,18 +1624,18 @@ xdr_xtc_get_last_frame_number(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK) { int frame; gmx_off_t off; - *bOK = 1; + *bOK = true; if ((off = gmx_ftell(fp)) < 0) { - *bOK = 0; + *bOK = false; return -1; } if (gmx_fseek(fp, -3*XDR_INT_SIZE, SEEK_END)) { - *bOK = 0; + *bOK = false; return -1; } @@ -1648,7 +1648,7 @@ xdr_xtc_get_last_frame_number(FILE *fp, XDR *xdrs, int natoms, gmx_bool * bOK) if (gmx_fseek(fp, off, SEEK_SET)) { - *bOK = 0; + *bOK = false; return -1; } diff --git a/src/gromacs/fileio/tpxio.cpp b/src/gromacs/fileio/tpxio.cpp index 10f1c165aa..714a00033d 100644 --- a/src/gromacs/fileio/tpxio.cpp +++ b/src/gromacs/fileio/tpxio.cpp @@ -1001,7 +1001,7 @@ static void do_inputrec(t_fileio *fio, t_inputrec *ir, gmx_bool bRead, { int i, j, k, idum = 0; real rdum; - gmx_bool bdum = 0; + gmx_bool bdum = false; if (file_version != tpx_version) { diff --git a/src/gromacs/fileio/vmdio.cpp b/src/gromacs/fileio/vmdio.cpp index 4b587df7ef..64e23e5247 100644 --- a/src/gromacs/fileio/vmdio.cpp +++ b/src/gromacs/fileio/vmdio.cpp @@ -86,10 +86,10 @@ /* */ /*****************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include /* * Plugin header files; get plugin source from www.ks.uiuc.edu/Research/vmd" @@ -116,9 +116,9 @@ #include "gromacs/utility/smalloc.h" -typedef int (*initfunc)(void); +typedef int (*initfunc)(); typedef int (*regfunc)(void *, vmdplugin_register_cb); -typedef int (*finifunc)(void); +typedef int (*finifunc)(); @@ -211,7 +211,7 @@ gmx_bool read_next_vmd_frame(gmx_vmdplugin_t *vmdplugin, t_trxframe *fr) if (rc < 0) { vmdplugin->api->close_file_read(vmdplugin->handle); - return 0; + return false; } #if GMX_DOUBLE @@ -243,8 +243,8 @@ gmx_bool read_next_vmd_frame(gmx_vmdplugin_t *vmdplugin, t_trxframe *fr) } #endif - fr->bX = 1; - fr->bBox = 1; + fr->bX = true; + fr->bBox = true; vec[0] = .1*ts.A; vec[1] = .1*ts.B; vec[2] = .1*ts.C; angle[0] = ts.alpha; angle[1] = ts.beta; angle[2] = ts.gamma; matrix_convert(fr->box, vec, angle); @@ -259,7 +259,7 @@ gmx_bool read_next_vmd_frame(gmx_vmdplugin_t *vmdplugin, t_trxframe *fr) } - return 1; + return true; } static int load_vmd_library(const char *fn, gmx_vmdplugin_t *vmdplugin) @@ -430,7 +430,7 @@ int read_first_vmd_frame(const char *fn, gmx_vmdplugin_t **vmdpluginp, t_trxfram snew(fr->x, fr->natoms); - vmdplugin->bV = 0; + vmdplugin->bV = false; if (vmdplugin->api->abiversion > 10 && vmdplugin->api->read_timestep_metadata) { vmdplugin->api->read_timestep_metadata(vmdplugin->handle, metadata); diff --git a/src/gromacs/gmxana/gmx_awh.cpp b/src/gromacs/gmxana/gmx_awh.cpp index f7e7fbea7c..dd1d468361 100644 --- a/src/gromacs/gmxana/gmx_awh.cpp +++ b/src/gromacs/gmxana/gmx_awh.cpp @@ -318,7 +318,7 @@ OutputFile::OutputFile(const std::string &filename, numDim_(0), firstGraphSubBlock_(0), numGraph_(0), - useKTForEnergy_(0) + useKTForEnergy_(false) { baseFilename_ = filename.substr(0, filename.find('.')); diff --git a/src/gromacs/gmxana/gmx_bar.cpp b/src/gromacs/gmxana/gmx_bar.cpp index 71327f8188..af0530c08d 100644 --- a/src/gromacs/gmxana/gmx_bar.cpp +++ b/src/gromacs/gmxana/gmx_bar.cpp @@ -2272,7 +2272,7 @@ static gmx_bool read_lambda_compvec(const char *str, lc_in = lc_out; } - while (1) + while (true) { if (!start_reached) { diff --git a/src/gromacs/gmxana/gmx_densorder.cpp b/src/gromacs/gmxana/gmx_densorder.cpp index d4cbcaa3da..94997770cc 100644 --- a/src/gromacs/gmxana/gmx_densorder.cpp +++ b/src/gromacs/gmxana/gmx_densorder.cpp @@ -266,7 +266,7 @@ static void density_in_time (const char *fn, int **index, const int gnx[], real gmx_rmpbc_done(gpbc); close_trx(status); - if (/* DISABLES CODE */ (0)) + if (/* DISABLES CODE */ (false)) { FILE *fp; fp = fopen("koko.xvg", "w"); diff --git a/src/gromacs/gmxana/gmx_disre.cpp b/src/gromacs/gmxana/gmx_disre.cpp index 7000f0ad9e..9934e3d986 100644 --- a/src/gromacs/gmxana/gmx_disre.cpp +++ b/src/gromacs/gmxana/gmx_disre.cpp @@ -95,7 +95,7 @@ static void init5(int n) snew(top, ntop); } -static void reset5(void) +static void reset5() { int i; diff --git a/src/gromacs/gmxana/gmx_hbond.cpp b/src/gromacs/gmxana/gmx_hbond.cpp index 41a9f2df77..157d53da35 100644 --- a/src/gromacs/gmxana/gmx_hbond.cpp +++ b/src/gromacs/gmxana/gmx_hbond.cpp @@ -262,7 +262,7 @@ static void _set_hb(unsigned int hbexist[], unsigned int frame, gmx_bool bValue) static gmx_bool is_hb(const unsigned int hbexist[], int frame) { - return ((hbexist[OFFSET(frame)] & MASK(frame)) != 0) ? 1 : 0; + return (hbexist[OFFSET(frame)] & MASK(frame)) != 0; } static void set_hb(t_hbdata *hb, int id, int ih, int ia, int frame, int ihb) diff --git a/src/gromacs/gmxana/gmx_make_edi.cpp b/src/gromacs/gmxana/gmx_make_edi.cpp index 31c7e6e11f..77d361396d 100644 --- a/src/gromacs/gmxana/gmx_make_edi.cpp +++ b/src/gromacs/gmxana/gmx_make_edi.cpp @@ -863,7 +863,7 @@ int gmx_make_edi(int argc, char *argv[]) &xref1, &edi_params.fitmas, &xav1, &edi_params.pcamas, &nvec1, &eignr1, &eigvec1, &eigval1); read_tps_conf(ftp2fn(efTPS, NFILE, fnm), - &top, &ePBC, &xtop, nullptr, topbox, 0); + &top, &ePBC, &xtop, nullptr, topbox, false); atoms = &top.atoms; diff --git a/src/gromacs/gmxana/gmx_msd.cpp b/src/gromacs/gmxana/gmx_msd.cpp index fab8faef8e..9a13ea7238 100644 --- a/src/gromacs/gmxana/gmx_msd.cpp +++ b/src/gromacs/gmxana/gmx_msd.cpp @@ -917,7 +917,7 @@ static void do_corr(const char *trx_file, const char *ndx_file, const char *msd_ beginfit, endfit); nat_trx = - corr_loop(msd, trx_file, top, ePBC, mol_file ? gnx[0] : 0, gnx, index, + corr_loop(msd, trx_file, top, ePBC, mol_file ? gnx[0] : false, gnx, index, (mol_file != nullptr) ? calc1_mol : (bMW ? calc1_mw : calc1_norm), bTen, gnx_com, index_com, dt, t_pdb, pdb_file ? &x : nullptr, box, oenv); diff --git a/src/gromacs/gmxana/gmx_potential.cpp b/src/gromacs/gmxana/gmx_potential.cpp index 3131aceaaf..4c39aa2e41 100644 --- a/src/gromacs/gmxana/gmx_potential.cpp +++ b/src/gromacs/gmxana/gmx_potential.cpp @@ -422,7 +422,7 @@ int gmx_potential(int argc, char *argv[]) static int ngrps = 1; static gmx_bool bSpherical = FALSE; /* default is bilayer types */ static real fudge_z = 0; /* translate coordinates */ - static gmx_bool bCorrect = 0; + static gmx_bool bCorrect = false; t_pargs pa [] = { { "-d", FALSE, etSTR, {&axtitle}, "Take the normal on the membrane in direction X, Y or Z." }, diff --git a/src/gromacs/gmxana/gmx_trjconv.cpp b/src/gromacs/gmxana/gmx_trjconv.cpp index f2e2125e59..55771c8e17 100644 --- a/src/gromacs/gmxana/gmx_trjconv.cpp +++ b/src/gromacs/gmxana/gmx_trjconv.cpp @@ -1054,7 +1054,8 @@ int gmx_trjconv(int argc, char *argv[]) /* Check for number of files disabled, as FOPEN_MAX is not the correct * number to check for. In my linux box it is only 16. */ - if (/* DISABLES CODE */ (0) && (clust->clust->nr > FOPEN_MAX-4)) + if (/* DISABLES CODE */ (false)) + //if (clust->clust->nr > FOPEN_MAX-4) { gmx_fatal(FARGS, "Can not open enough (%d) files to write all the" " trajectories.\ntry splitting the index file in %d parts.\n" diff --git a/src/gromacs/gmxana/gmx_wham.cpp b/src/gromacs/gmxana/gmx_wham.cpp index 01606649bc..d9f171f943 100644 --- a/src/gromacs/gmxana/gmx_wham.cpp +++ b/src/gromacs/gmxana/gmx_wham.cpp @@ -579,7 +579,7 @@ static void read_pdo_data(FILE * file, t_UmbrellaHeader * header, double temp, time, time0 = 0, dt; char *ptr = nullptr; t_UmbrellaWindow * window = nullptr; - gmx_bool timeok, dt_ok = 1; + gmx_bool timeok, dt_ok = true; char *tmpbuf = nullptr, fmt[256], fmtign[256], fmtlf[5] = "%lf"; int len = STRLEN, dstep = 1; const int blocklen = 4096; @@ -1851,7 +1851,7 @@ static FILE *open_pdo_pipe(const char *fn, t_UmbrellaOptions *opt, gmx_bool *bPi { char Buffer[1024], gunzip[1024], *Path = nullptr; FILE *pipe = nullptr; - static gmx_bool bFirst = 1; + static gmx_bool bFirst = true; /* gzipped pdo file? */ if ((std::strcmp(fn+std::strlen(fn)-3, ".gz") == 0)) @@ -1886,7 +1886,7 @@ static FILE *open_pdo_pipe(const char *fn, t_UmbrellaOptions *opt, gmx_bool *bPi if (bFirst) { printf("Using gunzip executable %s\n", gunzip); - bFirst = 0; + bFirst = false; } if (!gmx_fexist(fn)) { diff --git a/src/gromacs/gmxlib/network.h b/src/gromacs/gmxlib/network.h index 96eca851e1..901d48a7c5 100644 --- a/src/gromacs/gmxlib/network.h +++ b/src/gromacs/gmxlib/network.h @@ -50,7 +50,7 @@ struct gmx_multisim_t; struct t_commrec; struct t_filenm; -struct t_commrec *init_commrec(void); +struct t_commrec *init_commrec(); /* Allocate, initialize and return the commrec. */ void done_commrec(t_commrec *cr); diff --git a/src/gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_allvsall.cpp b/src/gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_allvsall.cpp index 542795b165..57bd21d9a5 100644 --- a/src/gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_allvsall.cpp +++ b/src/gromacs/gmxlib/nonbonded/nb_kernel_c/nb_kernel_allvsall.cpp @@ -40,7 +40,7 @@ #include "config.h" -#include +#include #include "gromacs/gmxlib/nrnb.h" #include "gromacs/math/functions.h" diff --git a/src/gromacs/gmxpreprocess/add_par.cpp b/src/gromacs/gmxpreprocess/add_par.cpp index 4a07968e4e..aca94d8a2d 100644 --- a/src/gromacs/gmxpreprocess/add_par.cpp +++ b/src/gromacs/gmxpreprocess/add_par.cpp @@ -39,7 +39,7 @@ #include "add_par.h" -#include +#include #include diff --git a/src/gromacs/gmxpreprocess/convparm.cpp b/src/gromacs/gmxpreprocess/convparm.cpp index ff4a568384..185a7f709a 100644 --- a/src/gromacs/gmxpreprocess/convparm.cpp +++ b/src/gromacs/gmxpreprocess/convparm.cpp @@ -39,10 +39,9 @@ #include "convparm.h" -#include - #include #include +#include #include "gromacs/gmxpreprocess/gpp_atomtype.h" #include "gromacs/gmxpreprocess/topio.h" diff --git a/src/gromacs/gmxpreprocess/fflibutil.cpp b/src/gromacs/gmxpreprocess/fflibutil.cpp index f8897302e2..3b55c4e836 100644 --- a/src/gromacs/gmxpreprocess/fflibutil.cpp +++ b/src/gromacs/gmxpreprocess/fflibutil.cpp @@ -36,7 +36,7 @@ #include "fflibutil.h" -#include +#include #include #include diff --git a/src/gromacs/gmxpreprocess/gen_ad.cpp b/src/gromacs/gmxpreprocess/gen_ad.cpp index 957a2454b4..780ee80f4a 100644 --- a/src/gromacs/gmxpreprocess/gen_ad.cpp +++ b/src/gromacs/gmxpreprocess/gen_ad.cpp @@ -39,11 +39,10 @@ #include "gen_ad.h" -#include -#include -#include - +#include #include +#include +#include #include diff --git a/src/gromacs/gmxpreprocess/gen_vsite.cpp b/src/gromacs/gmxpreprocess/gen_vsite.cpp index 3135ab3b20..abedc9cef0 100644 --- a/src/gromacs/gmxpreprocess/gen_vsite.cpp +++ b/src/gromacs/gmxpreprocess/gen_vsite.cpp @@ -38,11 +38,10 @@ #include "gen_vsite.h" -#include -#include -#include - #include +#include +#include +#include #include "gromacs/fileio/pdbio.h" #include "gromacs/gmxpreprocess/add_par.h" diff --git a/src/gromacs/gmxpreprocess/genhydro.cpp b/src/gromacs/gmxpreprocess/genhydro.cpp index e9a41c1600..e47c79e588 100644 --- a/src/gromacs/gmxpreprocess/genhydro.cpp +++ b/src/gromacs/gmxpreprocess/genhydro.cpp @@ -38,8 +38,8 @@ #include "genhydro.h" -#include -#include +#include +#include #include "gromacs/fileio/confio.h" #include "gromacs/gmxlib/network.h" diff --git a/src/gromacs/gmxpreprocess/gmxcpp.cpp b/src/gromacs/gmxpreprocess/gmxcpp.cpp index a771394479..5e9c584807 100644 --- a/src/gromacs/gmxpreprocess/gmxcpp.cpp +++ b/src/gromacs/gmxpreprocess/gmxcpp.cpp @@ -38,14 +38,13 @@ #include "gmxcpp.h" -#include -#include -#include -#include -#include -#include - +#include +#include +#include #include +#include +#include +#include #include @@ -712,22 +711,6 @@ int cpp_close_file(gmx_cpp_t *handlep) gmx_chdir(handle->cwd); } - if (0) - { - switch (errno) - { - case 0: - break; - case ENOENT: - return eCPP_FILE_NOT_FOUND; - case EBADF: - return eCPP_FILE_NOT_OPEN; - case EINTR: - return eCPP_INTERRUPT; - default: - return eCPP_UNKNOWN; - } - } handle->fp = nullptr; handle->line_nr = 0; if (nullptr != handle->fn) diff --git a/src/gromacs/gmxpreprocess/gpp_atomtype.cpp b/src/gromacs/gmxpreprocess/gpp_atomtype.cpp index 033fb2015c..5bbb1839e9 100644 --- a/src/gromacs/gmxpreprocess/gpp_atomtype.cpp +++ b/src/gromacs/gmxpreprocess/gpp_atomtype.cpp @@ -38,10 +38,9 @@ #include "gpp_atomtype.h" -#include - #include #include +#include #include "gromacs/gmxpreprocess/notset.h" #include "gromacs/gmxpreprocess/topdirs.h" @@ -176,7 +175,7 @@ real get_atomtype_nbparam(int nt, int param, gpp_atomtype_t ga) return ga->nb[nt].c[param]; } -gpp_atomtype_t init_atomtype(void) +gpp_atomtype_t init_atomtype() { gpp_atomtype_t ga; diff --git a/src/gromacs/gmxpreprocess/gpp_atomtype.h b/src/gromacs/gmxpreprocess/gpp_atomtype.h index 66d5285b0d..20af27744e 100644 --- a/src/gromacs/gmxpreprocess/gpp_atomtype.h +++ b/src/gromacs/gmxpreprocess/gpp_atomtype.h @@ -69,7 +69,7 @@ int get_atomtype_atomnumber(int nt, gpp_atomtype_t at); real get_atomtype_nbparam(int nt, int param, gpp_atomtype_t at); /* Similar to the previous but returns the paramth parameter or NOTSET */ -gpp_atomtype_t init_atomtype(void); +gpp_atomtype_t init_atomtype(); /* Return a new atomtype structure */ void done_atomtype(gpp_atomtype_t at); diff --git a/src/gromacs/gmxpreprocess/gpp_bond_atomtype.cpp b/src/gromacs/gmxpreprocess/gpp_bond_atomtype.cpp index ce31d32f8b..48ac1c4f67 100644 --- a/src/gromacs/gmxpreprocess/gpp_bond_atomtype.cpp +++ b/src/gromacs/gmxpreprocess/gpp_bond_atomtype.cpp @@ -38,7 +38,7 @@ #include "gpp_bond_atomtype.h" -#include +#include #include "gromacs/gmxpreprocess/notset.h" #include "gromacs/topology/symtab.h" @@ -80,7 +80,7 @@ char *get_bond_atomtype_name(int nt, t_bond_atomtype at) return *(ga->atomname[nt]); } -t_bond_atomtype init_bond_atomtype(void) +t_bond_atomtype init_bond_atomtype() { gpp_bond_atomtype *ga; diff --git a/src/gromacs/gmxpreprocess/gpp_bond_atomtype.h b/src/gromacs/gmxpreprocess/gpp_bond_atomtype.h index cd3d3c60d1..4f0b6b2677 100644 --- a/src/gromacs/gmxpreprocess/gpp_bond_atomtype.h +++ b/src/gromacs/gmxpreprocess/gpp_bond_atomtype.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2011,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2011,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -49,7 +49,7 @@ int get_bond_atomtype_type(char *str, t_bond_atomtype at); char *get_bond_atomtype_name(int nt, t_bond_atomtype at); /* Return name corresponding to atomtype nt, or NULL if not found */ -t_bond_atomtype init_bond_atomtype(void); +t_bond_atomtype init_bond_atomtype(); /* Return a new atomtype structure */ void done_bond_atomtype(t_bond_atomtype *at); diff --git a/src/gromacs/gmxpreprocess/gpp_nextnb.cpp b/src/gromacs/gmxpreprocess/gpp_nextnb.cpp index a1e1baa09c..e9ac0563eb 100644 --- a/src/gromacs/gmxpreprocess/gpp_nextnb.cpp +++ b/src/gromacs/gmxpreprocess/gpp_nextnb.cpp @@ -39,7 +39,7 @@ #include "gpp_nextnb.h" -#include +#include #include "gromacs/gmxpreprocess/toputil.h" #include "gromacs/topology/ifunc.h" diff --git a/src/gromacs/gmxpreprocess/grompp.cpp b/src/gromacs/gmxpreprocess/grompp.cpp index c3fe8e350d..960834afa2 100644 --- a/src/gromacs/gmxpreprocess/grompp.cpp +++ b/src/gromacs/gmxpreprocess/grompp.cpp @@ -38,11 +38,10 @@ #include "grompp.h" -#include -#include -#include - +#include +#include #include +#include #include diff --git a/src/gromacs/gmxpreprocess/h_db.cpp b/src/gromacs/gmxpreprocess/h_db.cpp index d21ff1094f..c8d2bc623f 100644 --- a/src/gromacs/gmxpreprocess/h_db.cpp +++ b/src/gromacs/gmxpreprocess/h_db.cpp @@ -39,8 +39,8 @@ #include "h_db.h" -#include -#include +#include +#include #include "gromacs/gmxpreprocess/fflibutil.h" #include "gromacs/gmxpreprocess/notset.h" diff --git a/src/gromacs/gmxpreprocess/hackblock.cpp b/src/gromacs/gmxpreprocess/hackblock.cpp index ad2a5fd736..9293a66eb0 100644 --- a/src/gromacs/gmxpreprocess/hackblock.cpp +++ b/src/gromacs/gmxpreprocess/hackblock.cpp @@ -39,7 +39,7 @@ #include "hackblock.h" -#include +#include #include "gromacs/gmxpreprocess/notset.h" #include "gromacs/math/vec.h" diff --git a/src/gromacs/gmxpreprocess/hizzie.cpp b/src/gromacs/gmxpreprocess/hizzie.cpp index c81add20c3..b7ddc4694b 100644 --- a/src/gromacs/gmxpreprocess/hizzie.cpp +++ b/src/gromacs/gmxpreprocess/hizzie.cpp @@ -39,10 +39,9 @@ #include "hizzie.h" -#include -#include - #include +#include +#include #include "gromacs/fileio/pdbio.h" #include "gromacs/gmxpreprocess/pdb2top.h" diff --git a/src/gromacs/gmxpreprocess/nm2type.cpp b/src/gromacs/gmxpreprocess/nm2type.cpp index a469435ced..0bb7da27ff 100644 --- a/src/gromacs/gmxpreprocess/nm2type.cpp +++ b/src/gromacs/gmxpreprocess/nm2type.cpp @@ -39,7 +39,7 @@ #include "nm2type.h" -#include +#include #include diff --git a/src/gromacs/gmxpreprocess/pdb2gmx.cpp b/src/gromacs/gmxpreprocess/pdb2gmx.cpp index 38399157a1..df98f0905c 100644 --- a/src/gromacs/gmxpreprocess/pdb2gmx.cpp +++ b/src/gromacs/gmxpreprocess/pdb2gmx.cpp @@ -38,10 +38,10 @@ #include "pdb2gmx.h" -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/src/gromacs/gmxpreprocess/pdb2top.cpp b/src/gromacs/gmxpreprocess/pdb2top.cpp index 913d227827..f74c9c3d76 100644 --- a/src/gromacs/gmxpreprocess/pdb2top.cpp +++ b/src/gromacs/gmxpreprocess/pdb2top.cpp @@ -38,11 +38,10 @@ #include "pdb2top.h" -#include -#include -#include - +#include #include +#include +#include #include #include diff --git a/src/gromacs/gmxpreprocess/pgutil.cpp b/src/gromacs/gmxpreprocess/pgutil.cpp index 1dfd29551f..91e44ef6de 100644 --- a/src/gromacs/gmxpreprocess/pgutil.cpp +++ b/src/gromacs/gmxpreprocess/pgutil.cpp @@ -40,7 +40,7 @@ #include "pgutil.h" -#include +#include #include "gromacs/topology/atoms.h" #include "gromacs/utility/cstringutil.h" diff --git a/src/gromacs/gmxpreprocess/readir.cpp b/src/gromacs/gmxpreprocess/readir.cpp index 27e30adbcb..3a3873782b 100644 --- a/src/gromacs/gmxpreprocess/readir.cpp +++ b/src/gromacs/gmxpreprocess/readir.cpp @@ -38,11 +38,10 @@ #include "readir.h" -#include -#include -#include - +#include +#include #include +#include #include #include diff --git a/src/gromacs/gmxpreprocess/readpull.cpp b/src/gromacs/gmxpreprocess/readpull.cpp index f1bef30049..32120e5ccf 100644 --- a/src/gromacs/gmxpreprocess/readpull.cpp +++ b/src/gromacs/gmxpreprocess/readpull.cpp @@ -36,9 +36,9 @@ */ #include "gmxpre.h" -#include -#include -#include +#include +#include +#include #include "gromacs/domdec/localatomsetmanager.h" #include "gromacs/fileio/readinp.h" diff --git a/src/gromacs/gmxpreprocess/resall.cpp b/src/gromacs/gmxpreprocess/resall.cpp index b2bc373a74..30aa182e26 100644 --- a/src/gromacs/gmxpreprocess/resall.cpp +++ b/src/gromacs/gmxpreprocess/resall.cpp @@ -38,9 +38,9 @@ #include "resall.h" -#include -#include -#include +#include +#include +#include #include diff --git a/src/gromacs/gmxpreprocess/solvate.cpp b/src/gromacs/gmxpreprocess/solvate.cpp index f4158c1617..ceac85da9c 100644 --- a/src/gromacs/gmxpreprocess/solvate.cpp +++ b/src/gromacs/gmxpreprocess/solvate.cpp @@ -38,7 +38,7 @@ #include "solvate.h" -#include +#include #include #include diff --git a/src/gromacs/gmxpreprocess/specbond.cpp b/src/gromacs/gmxpreprocess/specbond.cpp index 6edf217836..cd72daf5e4 100644 --- a/src/gromacs/gmxpreprocess/specbond.cpp +++ b/src/gromacs/gmxpreprocess/specbond.cpp @@ -38,10 +38,9 @@ #include "specbond.h" -#include -#include - +#include #include +#include #include @@ -53,7 +52,7 @@ #include "gromacs/utility/smalloc.h" #include "gromacs/utility/strdb.h" -bool yesno(void) +bool yesno() { char c; diff --git a/src/gromacs/gmxpreprocess/specbond.h b/src/gromacs/gmxpreprocess/specbond.h index 645c82bf0d..fc0de3519f 100644 --- a/src/gromacs/gmxpreprocess/specbond.h +++ b/src/gromacs/gmxpreprocess/specbond.h @@ -43,6 +43,6 @@ int mk_specbonds(t_atoms *pdba, rvec x[], bool bInteractive, t_ssbond **specbonds, bool bVerbose); -bool yesno(void); +bool yesno(); #endif diff --git a/src/gromacs/gmxpreprocess/ter_db.cpp b/src/gromacs/gmxpreprocess/ter_db.cpp index f7ebbd5708..782ad1be9d 100644 --- a/src/gromacs/gmxpreprocess/ter_db.cpp +++ b/src/gromacs/gmxpreprocess/ter_db.cpp @@ -38,8 +38,8 @@ #include "ter_db.h" -#include -#include +#include +#include #include "gromacs/fileio/gmxfio.h" #include "gromacs/gmxpreprocess/fflibutil.h" diff --git a/src/gromacs/gmxpreprocess/tomorse.cpp b/src/gromacs/gmxpreprocess/tomorse.cpp index be2b42284b..c26a47b4b6 100644 --- a/src/gromacs/gmxpreprocess/tomorse.cpp +++ b/src/gromacs/gmxpreprocess/tomorse.cpp @@ -39,11 +39,10 @@ #include "tomorse.h" -#include -#include -#include - +#include #include +#include +#include #include "gromacs/gmxpreprocess/gpp_atomtype.h" #include "gromacs/gmxpreprocess/grompp-impl.h" diff --git a/src/gromacs/gmxpreprocess/topdirs.cpp b/src/gromacs/gmxpreprocess/topdirs.cpp index a57275f2a0..90d9c5d8a0 100644 --- a/src/gromacs/gmxpreprocess/topdirs.cpp +++ b/src/gromacs/gmxpreprocess/topdirs.cpp @@ -38,8 +38,8 @@ #include "topdirs.h" -#include -#include +#include +#include #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/gmxpreprocess/topio.cpp b/src/gromacs/gmxpreprocess/topio.cpp index 4354a3f05e..cd918f3d74 100644 --- a/src/gromacs/gmxpreprocess/topio.cpp +++ b/src/gromacs/gmxpreprocess/topio.cpp @@ -38,14 +38,13 @@ #include "topio.h" -#include -#include -#include -#include -#include - #include +#include +#include #include +#include +#include +#include #include diff --git a/src/gromacs/gmxpreprocess/toppush.cpp b/src/gromacs/gmxpreprocess/toppush.cpp index 5f81a3d7e4..02d4c9f2bd 100644 --- a/src/gromacs/gmxpreprocess/toppush.cpp +++ b/src/gromacs/gmxpreprocess/toppush.cpp @@ -38,10 +38,9 @@ #include "toppush.h" -#include -#include - +#include #include +#include #include #include diff --git a/src/gromacs/gmxpreprocess/topshake.cpp b/src/gromacs/gmxpreprocess/topshake.cpp index 4a3725a0e8..cf48da1d8a 100644 --- a/src/gromacs/gmxpreprocess/topshake.cpp +++ b/src/gromacs/gmxpreprocess/topshake.cpp @@ -39,8 +39,7 @@ #include "topshake.h" -#include - +#include #include #include "gromacs/gmxpreprocess/notset.h" diff --git a/src/gromacs/gmxpreprocess/toputil.cpp b/src/gromacs/gmxpreprocess/toputil.cpp index 5a38d4d7a1..8a66e7bf73 100644 --- a/src/gromacs/gmxpreprocess/toputil.cpp +++ b/src/gromacs/gmxpreprocess/toputil.cpp @@ -38,10 +38,9 @@ #include "toputil.h" -#include - #include #include +#include #include diff --git a/src/gromacs/gmxpreprocess/vsite_parm.cpp b/src/gromacs/gmxpreprocess/vsite_parm.cpp index ef8c8a1408..ae5062496d 100644 --- a/src/gromacs/gmxpreprocess/vsite_parm.cpp +++ b/src/gromacs/gmxpreprocess/vsite_parm.cpp @@ -38,10 +38,9 @@ #include "vsite_parm.h" -#include -#include - #include +#include +#include #include diff --git a/src/gromacs/gmxpreprocess/xlate.cpp b/src/gromacs/gmxpreprocess/xlate.cpp index 44acfaae35..60d4d8e54d 100644 --- a/src/gromacs/gmxpreprocess/xlate.cpp +++ b/src/gromacs/gmxpreprocess/xlate.cpp @@ -38,8 +38,8 @@ #include "xlate.h" -#include -#include +#include +#include #include "gromacs/gmxpreprocess/fflibutil.h" #include "gromacs/gmxpreprocess/hackblock.h" diff --git a/src/gromacs/imd/imd.cpp b/src/gromacs/imd/imd.cpp index a9c9458e66..7b3ae87f21 100644 --- a/src/gromacs/imd/imd.cpp +++ b/src/gromacs/imd/imd.cpp @@ -51,8 +51,8 @@ #include "config.h" -#include -#include +#include +#include #if GMX_NATIVE_WINDOWS #include diff --git a/src/gromacs/imd/imdsocket.cpp b/src/gromacs/imd/imdsocket.cpp index d5a5cfb418..0820c57c93 100644 --- a/src/gromacs/imd/imdsocket.cpp +++ b/src/gromacs/imd/imdsocket.cpp @@ -52,8 +52,8 @@ #include "config.h" -#include -#include +#include +#include #include "gromacs/imd/imd.h" #include "gromacs/utility/fatalerror.h" @@ -81,7 +81,7 @@ extern int imdsock_winsockinit() /* On UNIX, we can use nice errors from errno.h */ #include #ifdef GMX_IMD -#include +#include #include #include diff --git a/src/gromacs/listed-forces/listed-forces.cpp b/src/gromacs/listed-forces/listed-forces.cpp index 23dbbd1d41..50aaa3ddbb 100644 --- a/src/gromacs/listed-forces/listed-forces.cpp +++ b/src/gromacs/listed-forces/listed-forces.cpp @@ -45,7 +45,7 @@ #include "listed-forces.h" -#include +#include #include diff --git a/src/gromacs/listed-forces/manage-threading.cpp b/src/gromacs/listed-forces/manage-threading.cpp index 82885e4af5..b62ac48a98 100644 --- a/src/gromacs/listed-forces/manage-threading.cpp +++ b/src/gromacs/listed-forces/manage-threading.cpp @@ -47,9 +47,9 @@ #include "config.h" -#include -#include -#include +#include +#include +#include #include diff --git a/src/gromacs/listed-forces/position-restraints.cpp b/src/gromacs/listed-forces/position-restraints.cpp index 6ceebe5c7f..f8f83bddd6 100644 --- a/src/gromacs/listed-forces/position-restraints.cpp +++ b/src/gromacs/listed-forces/position-restraints.cpp @@ -46,8 +46,7 @@ #include "position-restraints.h" -#include - +#include #include #include "gromacs/gmxlib/nrnb.h" diff --git a/src/gromacs/math/3dtransforms.cpp b/src/gromacs/math/3dtransforms.cpp index 8a79c79692..05f62d8a61 100644 --- a/src/gromacs/math/3dtransforms.cpp +++ b/src/gromacs/math/3dtransforms.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2010,2014,2016,2017, by the GROMACS development team, led by + * Copyright (c) 2010,2014,2016,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -38,9 +38,8 @@ #include "3dtransforms.h" -#include - #include +#include #include "gromacs/math/vec.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/math/do_fit.cpp b/src/gromacs/math/do_fit.cpp index b9584d97a2..d3e11eb2d8 100644 --- a/src/gromacs/math/do_fit.cpp +++ b/src/gromacs/math/do_fit.cpp @@ -38,9 +38,8 @@ #include "do_fit.h" -#include - #include +#include #include "gromacs/linearalgebra/nrjac.h" #include "gromacs/math/functions.h" diff --git a/src/gromacs/math/units.cpp b/src/gromacs/math/units.cpp index c4fb43ed07..f16e988a43 100644 --- a/src/gromacs/math/units.cpp +++ b/src/gromacs/math/units.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2010,2011,2014,2015,2017, by the GROMACS development team, led by + * Copyright (c) 2010,2011,2014,2015,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -36,7 +36,7 @@ #include "units.h" -#include +#include #include "gromacs/utility/cstringutil.h" diff --git a/src/gromacs/math/utilities.cpp b/src/gromacs/math/utilities.cpp index 0c4fedbae3..6110b3e13d 100644 --- a/src/gromacs/math/utilities.cpp +++ b/src/gromacs/math/utilities.cpp @@ -40,9 +40,8 @@ #include "config.h" -#include -#include - +#include +#include #include #include diff --git a/src/gromacs/mdlib/broadcaststructs.cpp b/src/gromacs/mdlib/broadcaststructs.cpp index ca47814b74..29157e7ff8 100644 --- a/src/gromacs/mdlib/broadcaststructs.cpp +++ b/src/gromacs/mdlib/broadcaststructs.cpp @@ -39,7 +39,7 @@ #include "broadcaststructs.h" -#include +#include #include "gromacs/gmxlib/network.h" #include "gromacs/math/vec.h" diff --git a/src/gromacs/mdlib/calc_verletbuf.cpp b/src/gromacs/mdlib/calc_verletbuf.cpp index 56ab300b2b..47fc1c9580 100644 --- a/src/gromacs/mdlib/calc_verletbuf.cpp +++ b/src/gromacs/mdlib/calc_verletbuf.cpp @@ -36,10 +36,9 @@ #include "calc_verletbuf.h" -#include -#include - +#include #include +#include #include diff --git a/src/gromacs/mdlib/calcmu.cpp b/src/gromacs/mdlib/calcmu.cpp index f9d4979d9c..2cf1e35816 100644 --- a/src/gromacs/mdlib/calcmu.cpp +++ b/src/gromacs/mdlib/calcmu.cpp @@ -39,8 +39,8 @@ #include "calcmu.h" -#include -#include +#include +#include #include "gromacs/gmxlib/network.h" #include "gromacs/math/units.h" diff --git a/src/gromacs/mdlib/compute_io.cpp b/src/gromacs/mdlib/compute_io.cpp index f3df0b4f2e..36cad80422 100644 --- a/src/gromacs/mdlib/compute_io.cpp +++ b/src/gromacs/mdlib/compute_io.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2012,2014,2015,2017, by the GROMACS development team, led by + * Copyright (c) 2012,2014,2015,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -38,8 +38,8 @@ #include "compute_io.h" -#include -#include +#include +#include #include "gromacs/mdtypes/inputrec.h" #include "gromacs/mdtypes/md_enums.h" diff --git a/src/gromacs/mdlib/constr.cpp b/src/gromacs/mdlib/constr.cpp index 5e085c375a..82b722ef02 100644 --- a/src/gromacs/mdlib/constr.cpp +++ b/src/gromacs/mdlib/constr.cpp @@ -45,10 +45,9 @@ #include "constr.h" -#include -#include - +#include #include +#include #include diff --git a/src/gromacs/mdlib/coupling.cpp b/src/gromacs/mdlib/coupling.cpp index 7fd5594d20..89c8cf2fb5 100644 --- a/src/gromacs/mdlib/coupling.cpp +++ b/src/gromacs/mdlib/coupling.cpp @@ -36,8 +36,7 @@ */ #include "gmxpre.h" -#include - +#include #include #include diff --git a/src/gromacs/mdlib/ebin.cpp b/src/gromacs/mdlib/ebin.cpp index 655d5a4406..45633bbf7e 100644 --- a/src/gromacs/mdlib/ebin.cpp +++ b/src/gromacs/mdlib/ebin.cpp @@ -39,9 +39,8 @@ #include "ebin.h" -#include - #include +#include #include "gromacs/math/units.h" #include "gromacs/math/utilities.h" @@ -52,7 +51,7 @@ #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" -t_ebin *mk_ebin(void) +t_ebin *mk_ebin() { t_ebin *eb; diff --git a/src/gromacs/mdlib/ebin.h b/src/gromacs/mdlib/ebin.h index 2c4240af25..3a52717748 100644 --- a/src/gromacs/mdlib/ebin.h +++ b/src/gromacs/mdlib/ebin.h @@ -59,7 +59,7 @@ enum { eprNORMAL, eprAVER, eprRMS, eprNR }; -t_ebin *mk_ebin(void); +t_ebin *mk_ebin(); /* Create an energy bin */ //! Empty the contents of \c eb. diff --git a/src/gromacs/mdlib/expanded.cpp b/src/gromacs/mdlib/expanded.cpp index dc83030e60..88686630fe 100644 --- a/src/gromacs/mdlib/expanded.cpp +++ b/src/gromacs/mdlib/expanded.cpp @@ -36,9 +36,8 @@ #include "expanded.h" -#include - #include +#include #include diff --git a/src/gromacs/mdlib/force.cpp b/src/gromacs/mdlib/force.cpp index 45929d219f..90b9b6c6ed 100644 --- a/src/gromacs/mdlib/force.cpp +++ b/src/gromacs/mdlib/force.cpp @@ -40,10 +40,9 @@ #include "config.h" -#include -#include - +#include #include +#include #include "gromacs/domdec/domdec.h" #include "gromacs/domdec/domdec_struct.h" diff --git a/src/gromacs/mdlib/forcerec.cpp b/src/gromacs/mdlib/forcerec.cpp index 3d30bc8f40..f3f8e5458e 100644 --- a/src/gromacs/mdlib/forcerec.cpp +++ b/src/gromacs/mdlib/forcerec.cpp @@ -40,11 +40,10 @@ #include "config.h" -#include -#include -#include - +#include #include +#include +#include #include @@ -106,7 +105,7 @@ #include "nbnxn_gpu_jit_support.h" -t_forcerec *mk_forcerec(void) +t_forcerec *mk_forcerec() { t_forcerec *fr; diff --git a/src/gromacs/mdlib/forcerec.h b/src/gromacs/mdlib/forcerec.h index 4d36ba7395..64e60c7332 100644 --- a/src/gromacs/mdlib/forcerec.h +++ b/src/gromacs/mdlib/forcerec.h @@ -58,7 +58,7 @@ class PhysicalNodeCommunicator; } /*! \brief Create a new forcerec structure */ -t_forcerec *mk_forcerec(void); +t_forcerec *mk_forcerec(); //! Destroy a forcerec. void done_forcerec(t_forcerec *fr, int numMolBlocks, int numEnergyGroups); diff --git a/src/gromacs/mdlib/lincs.cpp b/src/gromacs/mdlib/lincs.cpp index a5171a3daa..95b8ef17ce 100644 --- a/src/gromacs/mdlib/lincs.cpp +++ b/src/gromacs/mdlib/lincs.cpp @@ -47,10 +47,9 @@ #include "config.h" -#include -#include - +#include #include +#include #include #include diff --git a/src/gromacs/mdlib/mdebin.cpp b/src/gromacs/mdlib/mdebin.cpp index b8ea3238eb..59ed7ad46f 100644 --- a/src/gromacs/mdlib/mdebin.cpp +++ b/src/gromacs/mdlib/mdebin.cpp @@ -38,9 +38,9 @@ #include "mdebin.h" -#include -#include -#include +#include +#include +#include #include "gromacs/awh/awh.h" #include "gromacs/fileio/enxio.h" diff --git a/src/gromacs/mdlib/mdebin_bar.cpp b/src/gromacs/mdlib/mdebin_bar.cpp index 0597e8aaf9..7b2c030e79 100644 --- a/src/gromacs/mdlib/mdebin_bar.cpp +++ b/src/gromacs/mdlib/mdebin_bar.cpp @@ -38,11 +38,10 @@ #include "mdebin_bar.h" -#include -#include - #include +#include #include +#include #include "gromacs/compat/make_unique.h" #include "gromacs/fileio/enxio.h" diff --git a/src/gromacs/mdlib/membed.cpp b/src/gromacs/mdlib/membed.cpp index 11aeffa712..915f1f1da8 100644 --- a/src/gromacs/mdlib/membed.cpp +++ b/src/gromacs/mdlib/membed.cpp @@ -36,8 +36,8 @@ #include "membed.h" -#include -#include +#include +#include #include "gromacs/commandline/filenm.h" #include "gromacs/fileio/readinp.h" diff --git a/src/gromacs/mdlib/nbnxn_atomdata.cpp b/src/gromacs/mdlib/nbnxn_atomdata.cpp index a79e1cb6d5..5cffe634fd 100644 --- a/src/gromacs/mdlib/nbnxn_atomdata.cpp +++ b/src/gromacs/mdlib/nbnxn_atomdata.cpp @@ -37,11 +37,10 @@ #include "nbnxn_atomdata.h" -#include -#include -#include - +#include #include +#include +#include #include @@ -761,7 +760,7 @@ void nbnxn_atomdata_init(const gmx::MDLogger &mdlog, #endif else { - nbat->bUseTreeReduce = 0; + nbat->bUseTreeReduce = false; } if (nbat->bUseTreeReduce) { diff --git a/src/gromacs/mdlib/nbnxn_grid.cpp b/src/gromacs/mdlib/nbnxn_grid.cpp index 13aaf12ee4..915bdb802b 100644 --- a/src/gromacs/mdlib/nbnxn_grid.cpp +++ b/src/gromacs/mdlib/nbnxn_grid.cpp @@ -37,9 +37,8 @@ #include "nbnxn_grid.h" -#include - #include +#include #include diff --git a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.cpp b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.cpp index 66584a2300..f267e71bf6 100644 --- a/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.cpp +++ b/src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.cpp @@ -38,8 +38,7 @@ #include "config.h" -#include - +#include #include #include diff --git a/src/gromacs/mdlib/nbnxn_search.cpp b/src/gromacs/mdlib/nbnxn_search.cpp index 30edc88fe8..08539dcbeb 100644 --- a/src/gromacs/mdlib/nbnxn_search.cpp +++ b/src/gromacs/mdlib/nbnxn_search.cpp @@ -39,10 +39,9 @@ #include "config.h" -#include -#include - +#include #include +#include #include diff --git a/src/gromacs/mdlib/nbnxn_tuning.cpp b/src/gromacs/mdlib/nbnxn_tuning.cpp index 37d7d744b8..a7926bce9f 100644 --- a/src/gromacs/mdlib/nbnxn_tuning.cpp +++ b/src/gromacs/mdlib/nbnxn_tuning.cpp @@ -45,10 +45,9 @@ #include "nbnxn_tuning.h" -#include -#include - +#include #include +#include #include #include diff --git a/src/gromacs/mdlib/ns.cpp b/src/gromacs/mdlib/ns.cpp index a1b31a82ed..fde2b42344 100644 --- a/src/gromacs/mdlib/ns.cpp +++ b/src/gromacs/mdlib/ns.cpp @@ -38,10 +38,9 @@ #include "ns.h" -#include -#include - #include +#include +#include #include diff --git a/src/gromacs/mdlib/nsgrid.cpp b/src/gromacs/mdlib/nsgrid.cpp index 3c664b87a8..0712e27f63 100644 --- a/src/gromacs/mdlib/nsgrid.cpp +++ b/src/gromacs/mdlib/nsgrid.cpp @@ -39,10 +39,9 @@ #include "nsgrid.h" -#include -#include - #include +#include +#include #include diff --git a/src/gromacs/mdlib/qm_orca.cpp b/src/gromacs/mdlib/qm_orca.cpp index 287c97b64a..465174443c 100644 --- a/src/gromacs/mdlib/qm_orca.cpp +++ b/src/gromacs/mdlib/qm_orca.cpp @@ -38,11 +38,10 @@ #include "qm_orca.h" -#include -#include -#include - #include +#include +#include +#include #include "gromacs/fileio/confio.h" #include "gromacs/gmxlib/network.h" diff --git a/src/gromacs/mdlib/qmmm.cpp b/src/gromacs/mdlib/qmmm.cpp index e192cd4ac9..5729274be1 100644 --- a/src/gromacs/mdlib/qmmm.cpp +++ b/src/gromacs/mdlib/qmmm.cpp @@ -40,11 +40,10 @@ #include "config.h" -#include -#include -#include - #include +#include +#include +#include #include @@ -971,7 +970,7 @@ real calculate_QMMM(const t_commrec * /*unused*/, { gmx_incons("Compiled without QMMM"); } -t_QMMMrec *mk_QMMMrec(void) +t_QMMMrec *mk_QMMMrec() { return nullptr; } diff --git a/src/gromacs/mdlib/qmmm.h b/src/gromacs/mdlib/qmmm.h index d1ec5a14f5..aeb2a70852 100644 --- a/src/gromacs/mdlib/qmmm.h +++ b/src/gromacs/mdlib/qmmm.h @@ -110,7 +110,7 @@ typedef struct t_QMMMrec { void atomic_number(int nr, char ***atomtype, int *nucnum); -t_QMMMrec *mk_QMMMrec(void); +t_QMMMrec *mk_QMMMrec(); /* allocates memory for QMMMrec */ #if !GMX_QMMM diff --git a/src/gromacs/mdlib/rbin.cpp b/src/gromacs/mdlib/rbin.cpp index d0f49b146d..86e6db7585 100644 --- a/src/gromacs/mdlib/rbin.cpp +++ b/src/gromacs/mdlib/rbin.cpp @@ -43,7 +43,7 @@ #include "gromacs/utility/arrayref.h" #include "gromacs/utility/smalloc.h" -t_bin *mk_bin(void) +t_bin *mk_bin() { t_bin *b; diff --git a/src/gromacs/mdlib/rbin.h b/src/gromacs/mdlib/rbin.h index f76b93c9b0..129475cde5 100644 --- a/src/gromacs/mdlib/rbin.h +++ b/src/gromacs/mdlib/rbin.h @@ -48,7 +48,7 @@ typedef struct { double *rbuf; } t_bin; -t_bin *mk_bin(void); +t_bin *mk_bin(); /* Create a real bin */ void destroy_bin(t_bin *b); diff --git a/src/gromacs/mdlib/settle.cpp b/src/gromacs/mdlib/settle.cpp index fb68c73d72..ae85ab9e6d 100644 --- a/src/gromacs/mdlib/settle.cpp +++ b/src/gromacs/mdlib/settle.cpp @@ -45,10 +45,9 @@ #include "settle.h" -#include -#include - +#include #include +#include #include diff --git a/src/gromacs/mdlib/shellfc.cpp b/src/gromacs/mdlib/shellfc.cpp index c2c5eb4c0d..e4b54384c5 100644 --- a/src/gromacs/mdlib/shellfc.cpp +++ b/src/gromacs/mdlib/shellfc.cpp @@ -38,11 +38,10 @@ #include "shellfc.h" -#include -#include - #include #include +#include +#include #include #include diff --git a/src/gromacs/mdlib/sighandler.cpp b/src/gromacs/mdlib/sighandler.cpp index a9427de077..430edc29d8 100644 --- a/src/gromacs/mdlib/sighandler.cpp +++ b/src/gromacs/mdlib/sighandler.cpp @@ -123,7 +123,7 @@ static void gmx_signal(int signum) #endif } -void signal_handler_install(void) +void signal_handler_install() { if (getenv("GMX_NO_TERM") == nullptr) { @@ -153,7 +153,7 @@ void signal_handler_install(void) #endif } -gmx_stop_cond_t gmx_get_stop_condition(void) +gmx_stop_cond_t gmx_get_stop_condition() { return static_cast(stop_condition); } @@ -174,12 +174,12 @@ void gmx_set_stop_condition(gmx_stop_cond_t recvd_stop_cond) } } -const char *gmx_get_signal_name(void) +const char *gmx_get_signal_name() { return gmx_signal_name[last_signal_name]; } -gmx_bool gmx_got_usr_signal(void) +gmx_bool gmx_got_usr_signal() { #if HAVE_SIGUSR1 gmx_bool ret = static_cast(usr_condition); diff --git a/src/gromacs/mdlib/sighandler.h b/src/gromacs/mdlib/sighandler.h index 233399049b..616dfc6c4a 100644 --- a/src/gromacs/mdlib/sighandler.h +++ b/src/gromacs/mdlib/sighandler.h @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2010,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2010,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -61,20 +61,20 @@ extern const char *gmx_stop_cond_name[]; /* the externally visible functions: */ /* install the signal handlers that can set the stop condition. */ -void signal_handler_install(void); +void signal_handler_install(); /* get the current stop condition */ -gmx_stop_cond_t gmx_get_stop_condition(void); +gmx_stop_cond_t gmx_get_stop_condition(); /* set the stop condition upon receiving a remote one */ void gmx_set_stop_condition(gmx_stop_cond_t recvd_stop_cond); /* get the signal name that lead to the current stop condition. */ -const char *gmx_get_signal_name(void); +const char *gmx_get_signal_name(); /* check whether we received a USR1 signal. The condition is reset once a TRUE value is returned, so this function only returns TRUE once for a single signal. */ -gmx_bool gmx_got_usr_signal(void); +gmx_bool gmx_got_usr_signal(); #endif diff --git a/src/gromacs/mdlib/sim_util.cpp b/src/gromacs/mdlib/sim_util.cpp index 6673e430e7..d2904a0531 100644 --- a/src/gromacs/mdlib/sim_util.cpp +++ b/src/gromacs/mdlib/sim_util.cpp @@ -40,11 +40,10 @@ #include "config.h" -#include -#include - #include #include +#include +#include #include diff --git a/src/gromacs/mdlib/stat.cpp b/src/gromacs/mdlib/stat.cpp index 5c5ce34765..f6ff68069f 100644 --- a/src/gromacs/mdlib/stat.cpp +++ b/src/gromacs/mdlib/stat.cpp @@ -36,8 +36,8 @@ */ #include "gmxpre.h" -#include -#include +#include +#include #include "gromacs/domdec/domdec.h" #include "gromacs/domdec/domdec_struct.h" diff --git a/src/gromacs/mdlib/update.cpp b/src/gromacs/mdlib/update.cpp index 42ba4ea48b..add120c3cb 100644 --- a/src/gromacs/mdlib/update.cpp +++ b/src/gromacs/mdlib/update.cpp @@ -38,9 +38,8 @@ #include "update.h" -#include - #include +#include #include diff --git a/src/gromacs/mdlib/vsite.cpp b/src/gromacs/mdlib/vsite.cpp index e5085f769c..64c5d46b8a 100644 --- a/src/gromacs/mdlib/vsite.cpp +++ b/src/gromacs/mdlib/vsite.cpp @@ -38,7 +38,7 @@ #include "vsite.h" -#include +#include #include #include diff --git a/src/gromacs/mdlib/wall.cpp b/src/gromacs/mdlib/wall.cpp index b18874a029..7933d2670d 100644 --- a/src/gromacs/mdlib/wall.cpp +++ b/src/gromacs/mdlib/wall.cpp @@ -39,7 +39,7 @@ #include "wall.h" -#include +#include #include diff --git a/src/gromacs/mdlib/wnblist.cpp b/src/gromacs/mdlib/wnblist.cpp index 6f45539d9e..7d46334cc5 100644 --- a/src/gromacs/mdlib/wnblist.cpp +++ b/src/gromacs/mdlib/wnblist.cpp @@ -37,8 +37,8 @@ /* This file is completely threadsafe - keep it that way! */ #include "gmxpre.h" -#include -#include +#include +#include #include diff --git a/src/gromacs/mdrun/md.cpp b/src/gromacs/mdrun/md.cpp index 53085c187b..9a7670ae77 100644 --- a/src/gromacs/mdrun/md.cpp +++ b/src/gromacs/mdrun/md.cpp @@ -45,10 +45,9 @@ #include "config.h" -#include -#include - #include +#include +#include #include #include diff --git a/src/gromacs/mdrunutility/handlerestart.cpp b/src/gromacs/mdrunutility/handlerestart.cpp index 45f92de7df..d710abdca6 100644 --- a/src/gromacs/mdrunutility/handlerestart.cpp +++ b/src/gromacs/mdrunutility/handlerestart.cpp @@ -51,7 +51,7 @@ #include "handlerestart.h" -#include +#include #include "gromacs/commandline/filenm.h" #include "gromacs/fileio/checkpoint.h" diff --git a/src/gromacs/mdtypes/df_history.cpp b/src/gromacs/mdtypes/df_history.cpp index b535cd07ac..6068b97fc7 100644 --- a/src/gromacs/mdtypes/df_history.cpp +++ b/src/gromacs/mdtypes/df_history.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015, by the GROMACS development team, led by + * Copyright (c) 2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -45,7 +45,7 @@ void init_df_history(df_history_t *dfhist, int nlambda) int i; dfhist->nlambda = nlambda; - dfhist->bEquil = 0; + dfhist->bEquil = false; dfhist->wl_delta = 0; if (nlambda > 0) @@ -137,7 +137,7 @@ void done_df_history(df_history_t *dfhist) sfree(dfhist->accum_m2[i]); } } - dfhist->bEquil = 0; + dfhist->bEquil = false; dfhist->nlambda = 0; dfhist->wl_delta = 0; } diff --git a/src/gromacs/pbcutil/mshift.cpp b/src/gromacs/pbcutil/mshift.cpp index d7905596b1..ef86515707 100644 --- a/src/gromacs/pbcutil/mshift.cpp +++ b/src/gromacs/pbcutil/mshift.cpp @@ -38,7 +38,7 @@ #include "mshift.h" -#include +#include #include diff --git a/src/gromacs/pbcutil/pbc.h b/src/gromacs/pbcutil/pbc.h index d3570c8bfe..f5f001c2f0 100644 --- a/src/gromacs/pbcutil/pbc.h +++ b/src/gromacs/pbcutil/pbc.h @@ -298,7 +298,7 @@ void calc_compact_unitcell_vertices(int ecenter, const matrix box, * The index consists of NCUCEDGE pairs of vertex indices. * The index does not change, so it needs to be retrieved only once. */ -int *compact_unitcell_edges(void); +int *compact_unitcell_edges(); /*! \brief Put atoms inside the simulations box * diff --git a/src/gromacs/pbcutil/rmpbc.cpp b/src/gromacs/pbcutil/rmpbc.cpp index baa8c0e197..20336c6c73 100644 --- a/src/gromacs/pbcutil/rmpbc.cpp +++ b/src/gromacs/pbcutil/rmpbc.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -38,9 +38,8 @@ #include "rmpbc.h" -#include - #include +#include #include diff --git a/src/gromacs/pulling/pull.cpp b/src/gromacs/pulling/pull.cpp index 7336244f9c..4e3acbb65b 100644 --- a/src/gromacs/pulling/pull.cpp +++ b/src/gromacs/pulling/pull.cpp @@ -40,12 +40,11 @@ #include "config.h" -#include -#include -#include -#include - +#include #include +#include +#include +#include #include diff --git a/src/gromacs/pulling/pull_rotation.cpp b/src/gromacs/pulling/pull_rotation.cpp index 74fb143114..315433b9ab 100644 --- a/src/gromacs/pulling/pull_rotation.cpp +++ b/src/gromacs/pulling/pull_rotation.cpp @@ -40,9 +40,9 @@ #include "config.h" -#include -#include -#include +#include +#include +#include #include diff --git a/src/gromacs/pulling/pullutil.cpp b/src/gromacs/pulling/pullutil.cpp index 4c1c1a62e0..bf96afdfa3 100644 --- a/src/gromacs/pulling/pullutil.cpp +++ b/src/gromacs/pulling/pullutil.cpp @@ -38,8 +38,8 @@ #include "config.h" -#include -#include +#include +#include #include "gromacs/fileio/confio.h" #include "gromacs/gmxlib/network.h" diff --git a/src/gromacs/selection/compiler.cpp b/src/gromacs/selection/compiler.cpp index 1e9875240c..87d3252881 100644 --- a/src/gromacs/selection/compiler.cpp +++ b/src/gromacs/selection/compiler.cpp @@ -273,9 +273,8 @@ #include "compiler.h" -#include - #include +#include #include diff --git a/src/gromacs/selection/evaluate.cpp b/src/gromacs/selection/evaluate.cpp index 79a1d1d020..c5659dbb2b 100644 --- a/src/gromacs/selection/evaluate.cpp +++ b/src/gromacs/selection/evaluate.cpp @@ -54,7 +54,7 @@ #include "evaluate.h" -#include +#include #include diff --git a/src/gromacs/selection/mempool.cpp b/src/gromacs/selection/mempool.cpp index aebe432598..d7c7cd3759 100644 --- a/src/gromacs/selection/mempool.cpp +++ b/src/gromacs/selection/mempool.cpp @@ -43,7 +43,7 @@ #include "mempool.h" -#include +#include #include diff --git a/src/gromacs/selection/parser.h b/src/gromacs/selection/parser.h index a0263cee49..51f723bcf6 100644 --- a/src/gromacs/selection/parser.h +++ b/src/gromacs/selection/parser.h @@ -177,7 +177,7 @@ typedef struct _gmx_sel_yypstate _gmx_sel_yypstate; int _gmx_sel_yypush_parse (_gmx_sel_yypstate *ps, int pushed_char, YYSTYPE const *pushed_val, YYLTYPE *pushed_loc, void *scanner); -_gmx_sel_yypstate * _gmx_sel_yypstate_new (void); +_gmx_sel_yypstate * _gmx_sel_yypstate_new (); void _gmx_sel_yypstate_delete (_gmx_sel_yypstate *ps); #endif /* !YY__GMX_SEL_YY_PARSER_H_INCLUDED */ diff --git a/src/gromacs/selection/parser.patch b/src/gromacs/selection/parser.patch index aa57eb089d..1a9630b81b 100644 --- a/src/gromacs/selection/parser.patch +++ b/src/gromacs/selection/parser.patch @@ -1,3 +1,14 @@ +--- parser.h 2018-08-12 14:27:05.680844826 -0700 ++++ parser.h 2018-08-12 14:23:36.936847674 -0700 +@@ -177,7 +177,7 @@ + + int _gmx_sel_yypush_parse (_gmx_sel_yypstate *ps, int pushed_char, YYSTYPE const *pushed_val, YYLTYPE *pushed_loc, void *scanner); + +-_gmx_sel_yypstate * _gmx_sel_yypstate_new (void); ++_gmx_sel_yypstate * _gmx_sel_yypstate_new (); + void _gmx_sel_yypstate_delete (_gmx_sel_yypstate *ps); + + #endif /* !YY__GMX_SEL_YY_PARSER_H_INCLUDED */ --- parser.cpp 2014-11-03 06:56:28.000000000 +0200 +++ parser.cpp 2014-11-03 06:57:35.000000000 +0200 @@ -437,7 +437,7 @@ diff --git a/src/gromacs/selection/parsetree.cpp b/src/gromacs/selection/parsetree.cpp index e9f8b49960..f3f16a6f82 100644 --- a/src/gromacs/selection/parsetree.cpp +++ b/src/gromacs/selection/parsetree.cpp @@ -224,8 +224,8 @@ #include "parsetree.h" -#include -#include +#include +#include #include diff --git a/src/gromacs/selection/poscalc.cpp b/src/gromacs/selection/poscalc.cpp index 28f8c85118..cedaf05459 100644 --- a/src/gromacs/selection/poscalc.cpp +++ b/src/gromacs/selection/poscalc.cpp @@ -63,7 +63,7 @@ #include "poscalc.h" -#include +#include #include #include diff --git a/src/gromacs/selection/position.cpp b/src/gromacs/selection/position.cpp index 0e0499c98d..196c982e5c 100644 --- a/src/gromacs/selection/position.cpp +++ b/src/gromacs/selection/position.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2017, by the GROMACS development team, led by + * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -43,7 +43,7 @@ #include "position.h" -#include +#include #include "gromacs/math/vec.h" #include "gromacs/selection/indexutil.h" diff --git a/src/gromacs/selection/regenerate_parser.sh b/src/gromacs/selection/regenerate_parser.sh index 56e2a77930..5533d18ebd 100755 --- a/src/gromacs/selection/regenerate_parser.sh +++ b/src/gromacs/selection/regenerate_parser.sh @@ -35,7 +35,7 @@ fi echo Generating parser.cpp and parser.h... && \ $BISON -t -o parser.cpp --defines=parser.h parser.y && \ patch -p0 < parser.patch && \ - rm -f parser.cpp.orig + rm -f parser.cpp.orig parser.h.orig [[ $FORCE || scanner.l -nt scanner.cpp ]] && \ echo Generating scanner.cpp and scanner_flex.h... && \ $FLEX -o scanner.cpp scanner.l && \ diff --git a/src/gromacs/selection/scanner_internal.cpp b/src/gromacs/selection/scanner_internal.cpp index 86fcc1660a..b04366c880 100644 --- a/src/gromacs/selection/scanner_internal.cpp +++ b/src/gromacs/selection/scanner_internal.cpp @@ -55,8 +55,8 @@ #include "scanner_internal.h" -#include -#include +#include +#include #include diff --git a/src/gromacs/selection/selmethod.cpp b/src/gromacs/selection/selmethod.cpp index 3ee5a474e5..17bc002e47 100644 --- a/src/gromacs/selection/selmethod.cpp +++ b/src/gromacs/selection/selmethod.cpp @@ -43,8 +43,8 @@ #include "selmethod.h" -#include -#include +#include +#include #include "gromacs/utility/arraysize.h" #include "gromacs/utility/cstringutil.h" diff --git a/src/gromacs/selection/sm_same.cpp b/src/gromacs/selection/sm_same.cpp index d89a201d76..ec4beace5e 100644 --- a/src/gromacs/selection/sm_same.cpp +++ b/src/gromacs/selection/sm_same.cpp @@ -41,8 +41,8 @@ */ #include "gmxpre.h" -#include -#include +#include +#include #include "gromacs/utility/arraysize.h" #include "gromacs/utility/exceptions.h" diff --git a/src/gromacs/swap/swapcoords.cpp b/src/gromacs/swap/swapcoords.cpp index 5f436e41d3..d1340d1d3f 100644 --- a/src/gromacs/swap/swapcoords.cpp +++ b/src/gromacs/swap/swapcoords.cpp @@ -43,9 +43,9 @@ #include "swapcoords.h" -#include -#include -#include +#include +#include +#include #include #include diff --git a/src/gromacs/taskassignment/decidegpuusage.cpp b/src/gromacs/taskassignment/decidegpuusage.cpp index 4e7691bc63..10bcbb8f50 100644 --- a/src/gromacs/taskassignment/decidegpuusage.cpp +++ b/src/gromacs/taskassignment/decidegpuusage.cpp @@ -45,8 +45,8 @@ #include "config.h" -#include -#include +#include +#include #include #include diff --git a/src/gromacs/taskassignment/resourcedivision.cpp b/src/gromacs/taskassignment/resourcedivision.cpp index ad7a544e49..dc5f518181 100644 --- a/src/gromacs/taskassignment/resourcedivision.cpp +++ b/src/gromacs/taskassignment/resourcedivision.cpp @@ -46,8 +46,8 @@ #include "config.h" -#include -#include +#include +#include #include diff --git a/src/gromacs/timing/cyclecounter.h b/src/gromacs/timing/cyclecounter.h index 2c78e68e10..40dddfae2a 100644 --- a/src/gromacs/timing/cyclecounter.h +++ b/src/gromacs/timing/cyclecounter.h @@ -199,7 +199,7 @@ static __inline__ gmx_cycles_t gmx_cycles_read(void) } #elif ((defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) || defined(__PGIC__)) && \ (defined(__i386__) || defined(__x86_64__)) && !defined(_CRAYC)) -static __inline__ gmx_cycles_t gmx_cycles_read(void) +static __inline__ gmx_cycles_t gmx_cycles_read() { /* x86 with GCC inline assembly - pentium TSC register */ unsigned low, high; @@ -435,10 +435,10 @@ static __inline__ bool gmx_cycles_have_counter(void) } #elif ((defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) || defined(__PGIC__) || defined(_CRAYC)) && \ (defined(__i386__) || defined(__x86_64__))) -static __inline__ bool gmx_cycles_have_counter(void) +static __inline__ bool gmx_cycles_have_counter() { /* x86 or x86-64 with GCC inline assembly - pentium TSC register */ - return 1; + return true; } #elif ((defined __aarch64__) && (defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__PATHSCALE__) || defined(__PGIC__))) static __inline bool gmx_cycles_have_counter(void) diff --git a/src/gromacs/timing/wallcycle.cpp b/src/gromacs/timing/wallcycle.cpp index 2bcd5d3442..a7eeb65846 100644 --- a/src/gromacs/timing/wallcycle.cpp +++ b/src/gromacs/timing/wallcycle.cpp @@ -145,7 +145,7 @@ static const char *PMEStageNames[] = "PME gather", }; -gmx_bool wallcycle_have_counter(void) +gmx_bool wallcycle_have_counter() { return gmx_cycles_have_counter(); } diff --git a/src/gromacs/timing/wallcycle.h b/src/gromacs/timing/wallcycle.h index 63e30e09fa..42897a001e 100644 --- a/src/gromacs/timing/wallcycle.h +++ b/src/gromacs/timing/wallcycle.h @@ -81,7 +81,7 @@ enum { ewcsNR }; -gmx_bool wallcycle_have_counter(void); +gmx_bool wallcycle_have_counter(); /* Returns if cycle counting is supported */ gmx_wallcycle_t wallcycle_init(FILE *fplog, int resetstep, struct t_commrec *cr); diff --git a/src/gromacs/topology/atomprop.cpp b/src/gromacs/topology/atomprop.cpp index e9af594dd4..e37b1b55c2 100644 --- a/src/gromacs/topology/atomprop.cpp +++ b/src/gromacs/topology/atomprop.cpp @@ -38,11 +38,10 @@ #include "atomprop.h" -#include -#include -#include - +#include #include +#include +#include #include "gromacs/math/utilities.h" #include "gromacs/topology/residuetypes.h" diff --git a/src/gromacs/topology/block.cpp b/src/gromacs/topology/block.cpp index 8784374c3d..1c0c9c422f 100644 --- a/src/gromacs/topology/block.cpp +++ b/src/gromacs/topology/block.cpp @@ -83,7 +83,7 @@ void init_blocka(t_blocka *block) block->a = nullptr; } -t_blocka *new_blocka(void) +t_blocka *new_blocka() { t_blocka *block; diff --git a/src/gromacs/topology/block.h b/src/gromacs/topology/block.h index 10d30e192a..4b910f6378 100644 --- a/src/gromacs/topology/block.h +++ b/src/gromacs/topology/block.h @@ -219,7 +219,7 @@ struct t_blocka void init_block(t_block *block); void init_blocka(t_blocka *block); -t_blocka *new_blocka(void); +t_blocka *new_blocka(); /* allocate new block */ void done_block(t_block *block); diff --git a/src/gromacs/topology/index.cpp b/src/gromacs/topology/index.cpp index 49a4b708d6..76f3a24e15 100644 --- a/src/gromacs/topology/index.cpp +++ b/src/gromacs/topology/index.cpp @@ -38,10 +38,10 @@ #include "index.h" -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/src/gromacs/topology/mtop_util.cpp b/src/gromacs/topology/mtop_util.cpp index 2dfd10f4c1..fed567e58c 100644 --- a/src/gromacs/topology/mtop_util.cpp +++ b/src/gromacs/topology/mtop_util.cpp @@ -36,11 +36,11 @@ #include "mtop_util.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "gromacs/math/vectypes.h" #include "gromacs/topology/atoms.h" diff --git a/src/gromacs/topology/symtab.cpp b/src/gromacs/topology/symtab.cpp index eb5693e301..df280d257c 100644 --- a/src/gromacs/topology/symtab.cpp +++ b/src/gromacs/topology/symtab.cpp @@ -38,8 +38,8 @@ #include "symtab.h" -#include -#include +#include +#include #include @@ -136,7 +136,7 @@ char **get_symtab_handle(t_symtab *symtab, int name) gmx_fatal(FARGS, "symtab get_symtab_handle %d not found", name); } -static t_symbuf *new_symbuf(void) +static t_symbuf *new_symbuf() { t_symbuf *symbuf; diff --git a/src/gromacs/topology/topsort.cpp b/src/gromacs/topology/topsort.cpp index 9cd8b1f22b..a1c69ff649 100644 --- a/src/gromacs/topology/topsort.cpp +++ b/src/gromacs/topology/topsort.cpp @@ -38,7 +38,7 @@ #include "topsort.h" -#include +#include #include "gromacs/topology/ifunc.h" #include "gromacs/topology/topology.h" diff --git a/src/gromacs/trajectoryanalysis/modules/surfacearea.cpp b/src/gromacs/trajectoryanalysis/modules/surfacearea.cpp index 0400f388ad..7a6155af68 100644 --- a/src/gromacs/trajectoryanalysis/modules/surfacearea.cpp +++ b/src/gromacs/trajectoryanalysis/modules/surfacearea.cpp @@ -38,11 +38,10 @@ #include "surfacearea.h" -#include -#include -#include - #include +#include +#include +#include #include #include diff --git a/src/gromacs/trajectoryanalysis/runnercommon.cpp b/src/gromacs/trajectoryanalysis/runnercommon.cpp index 4ba187e4ad..1b7e9a5ef7 100644 --- a/src/gromacs/trajectoryanalysis/runnercommon.cpp +++ b/src/gromacs/trajectoryanalysis/runnercommon.cpp @@ -43,7 +43,7 @@ #include "runnercommon.h" -#include +#include #include #include diff --git a/src/gromacs/utility/basenetwork.cpp b/src/gromacs/utility/basenetwork.cpp index 63ae6a2426..03d400755f 100644 --- a/src/gromacs/utility/basenetwork.cpp +++ b/src/gromacs/utility/basenetwork.cpp @@ -132,7 +132,7 @@ static int mpi_hostname_hash() return hash_int; } -int gmx_physicalnode_id_hash(void) +int gmx_physicalnode_id_hash() { int hash = 0; diff --git a/src/gromacs/utility/baseversion.h b/src/gromacs/utility/baseversion.h index 4bcccecbcb..5455171868 100644 --- a/src/gromacs/utility/baseversion.h +++ b/src/gromacs/utility/baseversion.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2015, by the GROMACS development team, led by + * Copyright (c) 2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -53,7 +53,7 @@ * * \ingroup module_utility */ -const char *gmx_version(void); +const char *gmx_version(); /*! \brief * Full git hash of the latest commit. * @@ -61,7 +61,7 @@ const char *gmx_version(void); * * \ingroup module_utility */ -const char *gmx_version_git_full_hash(void); +const char *gmx_version_git_full_hash(); /*! \brief * Full git hash of the latest commit in a central \Gromacs repository. * @@ -71,7 +71,7 @@ const char *gmx_version_git_full_hash(void); * * \ingroup module_utility */ -const char *gmx_version_git_central_base_hash(void); +const char *gmx_version_git_central_base_hash(); /*! \brief * Defined if ``libgromacs`` has been compiled in double precision. diff --git a/src/gromacs/utility/bitmask.h b/src/gromacs/utility/bitmask.h index d0e3c09572..4be28dfe65 100644 --- a/src/gromacs/utility/bitmask.h +++ b/src/gromacs/utility/bitmask.h @@ -156,7 +156,7 @@ inline static bool bitmask_is_set(gmx_bitmask_t m, int b) inline static bool bitmask_is_disjoint(gmx_bitmask_t a, gmx_bitmask_t b) { int i; - bool r = 1; + bool r = true; for (i = 0; i < BITMASK_ALEN; i++) { r = r && !(a[i] & b[i]); @@ -167,7 +167,7 @@ inline static bool bitmask_is_disjoint(gmx_bitmask_t a, gmx_bitmask_t b) inline static bool bitmask_is_equal(gmx_bitmask_t a, gmx_bitmask_t b) { int i; - bool r = 1; + bool r = true; for (i = 0; i < BITMASK_ALEN; i++) { r = r && (a[i] == b[i]); @@ -178,7 +178,7 @@ inline static bool bitmask_is_equal(gmx_bitmask_t a, gmx_bitmask_t b) inline static bool bitmask_is_zero(gmx_bitmask_t m) { int i; - bool r = 1; + bool r = true; for (i = 0; i < BITMASK_ALEN; i++) { r = r && !m[i]; diff --git a/src/gromacs/utility/compare.cpp b/src/gromacs/utility/compare.cpp index 94f86355a0..6214f25995 100644 --- a/src/gromacs/utility/compare.cpp +++ b/src/gromacs/utility/compare.cpp @@ -105,22 +105,6 @@ void cmp_uc(FILE *fp, const char *s, int index, unsigned char i1, unsigned char gmx_bool cmp_bool(FILE *fp, const char *s, int index, gmx_bool b1, gmx_bool b2) { - if (b1) - { - b1 = 1; - } - else - { - b1 = 0; - } - if (b2) - { - b2 = 1; - } - else - { - b2 = 0; - } if (b1 != b2) { if (index != -1) diff --git a/src/gromacs/utility/coolstuff.cpp b/src/gromacs/utility/coolstuff.cpp index 90a90ff480..cb567b9bd3 100644 --- a/src/gromacs/utility/coolstuff.cpp +++ b/src/gromacs/utility/coolstuff.cpp @@ -58,7 +58,7 @@ namespace { //! Whether printing of cool quotes is enabled -bool beCool(void) +bool beCool() { /* Yes, it is bad to check the environment variable every call, * but we dont call this routine often, and it avoids using diff --git a/src/gromacs/utility/cstringutil.cpp b/src/gromacs/utility/cstringutil.cpp index f92a4b8c15..5a5b66d78e 100644 --- a/src/gromacs/utility/cstringutil.cpp +++ b/src/gromacs/utility/cstringutil.cpp @@ -39,11 +39,10 @@ #include "cstringutil.h" -#include -#include - #include #include +#include +#include #include #include diff --git a/src/gromacs/utility/futil.cpp b/src/gromacs/utility/futil.cpp index 2ac9a03874..a98e3d01c3 100644 --- a/src/gromacs/utility/futil.cpp +++ b/src/gromacs/utility/futil.cpp @@ -40,10 +40,10 @@ #include "config.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -114,7 +114,7 @@ void setLibraryFileFinder(const DataFileFinder *finder) } // namespace gmx -void gmx_disable_file_buffering(void) +void gmx_disable_file_buffering() { bUnbuffered = true; } diff --git a/src/gromacs/utility/futil.h b/src/gromacs/utility/futil.h index d67be901ad..f06b502566 100644 --- a/src/gromacs/utility/futil.h +++ b/src/gromacs/utility/futil.h @@ -71,7 +71,7 @@ typedef int64_t gmx_off_t; * * This only has effect on files opened with gmx_ffopen(). */ -void gmx_disable_file_buffering(void); +void gmx_disable_file_buffering(); /*! \brief * Enables backups with the specified number of maximum backups. diff --git a/src/gromacs/utility/gmxomp.cpp b/src/gromacs/utility/gmxomp.cpp index 6dc2d2adaf..20e0679253 100644 --- a/src/gromacs/utility/gmxomp.cpp +++ b/src/gromacs/utility/gmxomp.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2012,2013,2014,2016,2017, by the GROMACS development team, led by + * Copyright (c) 2012,2013,2014,2016,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -44,8 +44,8 @@ #include "config.h" -#include -#include +#include +#include #if GMX_OPENMP #include diff --git a/src/gromacs/utility/smalloc.cpp b/src/gromacs/utility/smalloc.cpp index 7c68694125..f329a2c8ec 100644 --- a/src/gromacs/utility/smalloc.cpp +++ b/src/gromacs/utility/smalloc.cpp @@ -40,9 +40,9 @@ #include "config.h" -#include -#include -#include +#include +#include +#include #ifdef WITH_DMALLOC #include diff --git a/src/gromacs/utility/stringutil.cpp b/src/gromacs/utility/stringutil.cpp index 6d3b19e0f6..4f26420267 100644 --- a/src/gromacs/utility/stringutil.cpp +++ b/src/gromacs/utility/stringutil.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by + * Copyright (c) 2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -152,7 +152,7 @@ std::string formatStringV(const char *fmt, va_list ap) // TODO: There may be a better way of doing this on Windows, Microsoft // provides their own way of doing things... - while (1) + while (true) { va_copy(ap_copy, ap); int n = vsnprintf(buf, length, fmt, ap_copy); diff --git a/src/gromacs/utility/sysinfo.cpp b/src/gromacs/utility/sysinfo.cpp index 91fc69cc77..604756df25 100644 --- a/src/gromacs/utility/sysinfo.cpp +++ b/src/gromacs/utility/sysinfo.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by + * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -45,8 +45,8 @@ #include "config.h" -#include -#include +#include +#include #include #ifdef HAVE_SYS_TIME_H diff --git a/src/gromacs/utility/sysinfo.h b/src/gromacs/utility/sysinfo.h index fedb8bb082..c7a29d0008 100644 --- a/src/gromacs/utility/sysinfo.h +++ b/src/gromacs/utility/sysinfo.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2017, by the GROMACS development team, led by + * Copyright (c) 2014,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -71,13 +71,13 @@ int gmx_gethostname(char *buf, size_t len); * * Does not throw. */ -int gmx_getpid(void); +int gmx_getpid(); /*! \brief * Returns the current user ID, or -1 if not available. * * Does not throw. */ -int gmx_getuid(void); +int gmx_getuid(); /*! \brief * Gets the current user name, if available. * -- 2.22.0