Fix Portland compiler warnings
authorErik Lindahl <erik@kth.se>
Mon, 11 Aug 2014 13:27:53 +0000 (15:27 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sun, 17 Aug 2014 19:05:50 +0000 (21:05 +0200)
commitf5ca20c4e2f0dcfd13cd3a4b1a1f3d44cd892796
tree9c1032906be35e243e19e9c6417012fd50eb6e29
parent0a5a594e3eb093bc0e4183066ac5ccee1ba32c57
Fix Portland compiler warnings

The PGI compiler finds several unreachable code
parts, mainly due to multiple return statements
being used. For most places this is just a
cosmetic fix to get rid of warnings, but functions
that are performance-sensitive should only have
a single return statement since the return
instruction causes a pipeline stall on many
architectures. This patch also fixes a warning
about an unused variable.

Change-Id: Ibf1c9e9dd1cdf29fc59c84afa4348e02bed270e6
16 files changed:
src/gromacs/analysisdata/tests/histogram.cpp
src/gromacs/fft/fft5d.cpp
src/gromacs/fileio/tngio.cpp
src/gromacs/legacyheaders/types/simple.h
src/gromacs/selection/parser.cpp
src/gromacs/selection/parser.patch [new file with mode: 0644]
src/gromacs/selection/regenerate_parser.sh
src/gromacs/selection/scanner.cpp
src/gromacs/selection/scanner.l
src/gromacs/selection/scanner.patch [new file with mode: 0644]
src/gromacs/selection/scanner_flex.h
src/gromacs/selection/scanner_internal.cpp
src/gromacs/selection/selelem.cpp
src/gromacs/selection/sm_compare.cpp
src/gromacs/selection/tests/nbsearch.cpp
src/programs/mdrun/tests/moduletest.cpp