Removed unnecessary static declarations for command-line parsing
commit90b8d1677981fd445c1fb32d512bc8e0d5b3cf54
authorDavid van der Spoel <spoel@xray.bmc.uu.se>
Wed, 19 Jul 2017 07:13:17 +0000 (19 09:13 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 19 Jul 2017 12:16:12 +0000 (19 14:16 +0200)
tree716baad6e0befb481f0d08ec8ec454c819443360
parent98b77c0393cbde866fb4a98bda610dce18e0fabf
Removed unnecessary static declarations for command-line parsing

For historical reasons command-line parsing needed static variables
when declaring the t_pargs structures, however modern compilers
do not need this anymore. Simultaneously, repeatedly calling a function
containing static variables may lead to irreproducible results.
The programs fixed here have no unit tests, however grompp and pdb2gmx
are tested in the regression tests, which pass.

Fixed uninitialized variable that turned up when not static anymore.

TODO: fix the same in analysis tools.

Part of #2113.

Change-Id: I1f67cc54362062289264b83078d3317f8e914faf
src/gromacs/gmxpreprocess/grompp.cpp
src/gromacs/gmxpreprocess/pdb2gmx.cpp
src/gromacs/gmxpreprocess/x2top.cpp