Allow to enable clang-tidy with GMX_CLANG_TIDY
authorRoland Schulz <roland.schulz@intel.com>
Mon, 14 May 2018 05:39:20 +0000 (22:39 -0700)
committerRoland Schulz <roland.schulz@intel.com>
Sat, 23 Jun 2018 06:24:34 +0000 (23:24 -0700)
Fix all warnings with clang-tidy 6 without OpenMP.
OpenMP+clang-tidy has issue: #37442

Change-Id: I2380f63ba1d7541cf230fb99d53e42f7f515986a

16 files changed:
src/gromacs/CMakeLists.txt
src/gromacs/awh/grid.cpp
src/gromacs/correlationfunctions/expfit.cpp
src/gromacs/fileio/filetypes.cpp
src/gromacs/gmxana/gmx_confrms.cpp
src/gromacs/gmxana/gmx_hbond.cpp
src/gromacs/gmxana/gmx_helix.cpp
src/gromacs/gmxana/gmx_tcaf.cpp
src/gromacs/gmxpreprocess/gmxcpp.cpp
src/gromacs/gmxpreprocess/toppush.cpp
src/gromacs/listed-forces/manage-threading.cpp
src/gromacs/mdlib/membed.cpp
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn_prune.cpp
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn_prune.cpp
src/gromacs/tables/splineutil.cpp
src/gromacs/topology/index.cpp

index c6c37a7fd33e73c3eaabe694403f2e771f602e03..6252b7e13f44579eedf03742f9b3ac142c846e5c 100644 (file)
@@ -43,6 +43,11 @@ set_property(GLOBAL PROPERTY GMX_LIBGROMACS_GPU_IMPL_SOURCES)
 set_property(GLOBAL PROPERTY GMX_INSTALLED_HEADERS)
 set_property(GLOBAL PROPERTY GMX_AVX_512_SOURCE)
 
+add_library(libgromacs_external OBJECT "")
+if (BUILD_SHARED_LIBS)
+    set_target_properties(libgromacs_external PROPERTIES POSITION_INDEPENDENT_CODE true)
+endif()
+
 function (_gmx_add_files_to_property PROPERTY)
     foreach (_file ${ARGN})
         if (IS_ABSOLUTE "${_file}")
@@ -136,7 +141,7 @@ list(APPEND LIBGROMACS_SOURCES ${GMXLIB_SOURCES} ${MDLIB_SOURCES} ${PROPERTY_SOU
 #target_link_libraries(gmx ${GMX_EXTRA_LIBRARIES} ${THREAD_MPI_LIB})
 
 tmpi_get_source_list(THREAD_MPI_SOURCES ${CMAKE_SOURCE_DIR}/src/external/thread_mpi/src)
-list(APPEND LIBGROMACS_SOURCES ${THREAD_MPI_SOURCES})
+target_sources(libgromacs_external PRIVATE ${THREAD_MPI_SOURCES})
 
 configure_file(version.h.cmakein version.h)
 gmx_install_headers(
@@ -159,7 +164,8 @@ set(GENERATED_VERSION_FILE utility/baseversion-gen.c)
 gmx_configure_version_file(
     utility/baseversion-gen.c.cmakein ${GENERATED_VERSION_FILE}
     REMOTE_HASH)
-list(APPEND LIBGROMACS_SOURCES ${GENERATED_VERSION_FILE})
+list(APPEND LIBGROMACS_SOURCES ${GENERATED_VERSION_FILE}
+     $<TARGET_OBJECTS:libgromacs_external>)
 
 # Mark some shared GPU implementation files to compile with CUDA if needed
 if (GMX_USE_CUDA)
@@ -258,6 +264,18 @@ set_target_properties(libgromacs PROPERTIES
 gmx_manage_lmfit()
 target_link_libraries(libgromacs PRIVATE lmfit)
 
+if (GMX_CLANG_TIDY)
+   find_program(CLANG_TIDY_EXE NAMES "clang-tidy"
+       DOC "Path to clang-tidy executable")
+   if(NOT CLANG_TIDY_EXE)
+       message(ERROR "clang-tidy not found.")
+   endif()
+   if(CMAKE_VERSION VERSION_LESS "3.6")
+       message(ERROR "clang-tidy support requires cmake 3.6.")
+   endif()
+   set_target_properties(libgromacs PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_EXE};--checks=-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-core.NullDereference;-warnings-as-errors=*")
+endif()
+
 gmx_write_installed_header_list()
 
 # Only install the library in mdrun-only mode if it is actually necessary
index 26c6cc3e43e9ca97dc05f4c2c38e05372a2323e7..9285f6c3402a987e7436857c3859d610b2bf1934 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 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.
@@ -225,14 +225,14 @@ void linearGridindexToMultiDim(const Grid &grid,
                                int         indexLinear,
                                awh_ivec    indexMulti)
 {
-    awh_ivec numPointsDim;
-
-    for (int d = 0; d < grid.numDimensions(); d++)
+    awh_ivec  numPointsDim;
+    const int numDimensions = grid.numDimensions();
+    for (int d = 0; d < numDimensions; d++)
     {
         numPointsDim[d] = grid.axis(d).numPoints();
     }
 
-    linearArrayIndexToMultiDim(indexLinear, grid.numDimensions(), numPointsDim, indexMulti);
+    linearArrayIndexToMultiDim(indexLinear, numDimensions, numPointsDim, indexMulti);
 }
 
 
index d2cbd4bf6f55de765dcae77f11896d523b9634f3..81334b45b3471068459ce6da7595557fc58726b5 100644 (file)
@@ -743,6 +743,8 @@ real fit_acf(int ncorr, int fitfn, const gmx_output_env_t *oenv, gmx_bool bVerbo
     int         i, j, jmax, nf_int;
     gmx_bool    bPrint;
 
+    GMX_ASSERT(effnNparams(fitfn) < static_cast<int>(sizeof(fitparm)/sizeof(double)),
+               "Fitting function with more than 3 parameters not supported!");
     bPrint = bVerbose || bDebugMode();
 
     if (bPrint)
index f558370d0d82693705ac0f98757cab34798d3b5e..ff15328876b570a68f310806b60490ad5e4d7e94 100644 (file)
@@ -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.
@@ -97,7 +97,7 @@ static const int tpss[] =
 };
 #define NTPSS asize(tpss)
 
-typedef struct
+typedef struct // NOLINT(clang-analyzer-optin.performance.Padding)
 {
     int         ftype;
     const char *ext;
index 8d80f8c15f611b7f21a62b289264763c1b97ddff..1f1b1642d0448fe6c3850b941136ce1fb926f8a8 100644 (file)
@@ -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.
@@ -263,11 +263,11 @@ static int find_next_match_res(int *rnr1, int isize1,
                 }
             }
         }
+        /* apparently, dx and dy are incremented one more time
+           as the loops terminate: we correct this here */
+        dy--;
     }
-    /* apparently, dx and dy are incremented one more time
-       as the loops terminate: we correct this here */
     dx--;
-    dy--;
     /* if we skipped equal on both sides, only skip one residue
        to allow for single mutations of residues... */
     if (bFF)
index 94e417b2b26f2d553f31e35e96f6f3226bade5cd..0ce2477cca15c69ce45a808c39f69868fea1dfde 100644 (file)
@@ -2848,10 +2848,10 @@ int gmx_hbond(int argc, char *argv[])
     bEdge_xjj, bEdge_yjj) \
     default(shared)
     {                           /* Start of parallel region */
-#if !defined __clang_analyzer__ // clang complains about unused value.
-        threadNr = gmx_omp_get_thread_num();
-#endif
-
+        if (bOMP)
+        {
+            threadNr = gmx_omp_get_thread_num();
+        }
         do
         {
 
index 5589c4e94e659f04f1b09b1a561ecebb20348ff6..e5fd625218cbda19960c1613aefd3e344296841a 100644 (file)
@@ -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.
@@ -109,7 +109,7 @@ int gmx_helix(int argc, char *argv[])
           "Last residue in helix" }
     };
 
-    typedef struct {
+    typedef struct { //NOLINT(clang-analyzer-optin.performance.Padding)
         FILE       *fp, *fp2;
         gmx_bool    bfp2;
         const char *filenm;
index 940a51c9ffb73f47794f8a0f9640f2a34dba5914..ef3638dc96c0fe66dc1106fa4dcbb8a565d29ebe 100644 (file)
@@ -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.
 
 #define NKC  6
 #define NKC0 4
-int  kset_c[NKC+1] = { 0, 3, 9, 13, 16, 19, NK };
+static const int  kset_c[NKC+1] = { 0, 3, 9, 13, 16, 19, NK };
 
-rvec v0[NK] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 1, 0}, {1, -1, 0}, {1, 0, 1}, {1, 0, -1}, {0, 1, 1}, {0, 1, -1}, {1, 1, 1}, {1, 1, -1}, {1, -1, 1}, {-1, 1, 1}, {2, 0, 0}, {0, 2, 0}, {0, 0, 2}, {3, 0, 0}, {0, 3, 0}, {0, 0, 3}, {4, 0, 0}, {0, 4, 0}, {0, 0, 4}};
-rvec v1[NK] = {{0, 1, 0}, {0, 0, 1}, {1, 0, 0}, {0, 0, 1}, {0, 0, 1}, {0, 1, 0}, {0, 1, 0}, {1, 0, 0}, {1, 0, 0}, {1, -1, 0}, {1, -1, 0}, {1, 0, -1}, { 0, 1, -1}, {0, 1, 0}, {0, 0, 1}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 0, 0}};
-rvec v2[NK] = {{0, 0, 1}, {1, 0, 0}, {0, 1, 0}, {1, -1, 0}, {1, 1, 0}, {1, 0, -1}, {1, 0, 1}, {0, 1, -1}, {0, 1, 1}, {1, 1, -2}, {1, 1, 2}, {1, 2, 1}, { 2, 1, 1}, {0, 0, 1}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 0, 0}, {0, 1, 0}};
+rvec              v0[NK] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 1, 0}, {1, -1, 0}, {1, 0, 1}, {1, 0, -1}, {0, 1, 1}, {0, 1, -1}, {1, 1, 1}, {1, 1, -1}, {1, -1, 1}, {-1, 1, 1}, {2, 0, 0}, {0, 2, 0}, {0, 0, 2}, {3, 0, 0}, {0, 3, 0}, {0, 0, 3}, {4, 0, 0}, {0, 4, 0}, {0, 0, 4}};
+rvec              v1[NK] = {{0, 1, 0}, {0, 0, 1}, {1, 0, 0}, {0, 0, 1}, {0, 0, 1}, {0, 1, 0}, {0, 1, 0}, {1, 0, 0}, {1, 0, 0}, {1, -1, 0}, {1, -1, 0}, {1, 0, -1}, { 0, 1, -1}, {0, 1, 0}, {0, 0, 1}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 0, 0}};
+rvec              v2[NK] = {{0, 0, 1}, {1, 0, 0}, {0, 1, 0}, {1, -1, 0}, {1, 1, 0}, {1, 0, -1}, {1, 0, 1}, {0, 1, -1}, {0, 1, 1}, {1, 1, -2}, {1, 1, 2}, {1, 2, 1}, { 2, 1, 1}, {0, 0, 1}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 0, 0}, {0, 1, 0}};
 
 static void process_tcaf(int nframes, real dt, int nkc, real **tc, rvec *kfac,
                          real rho, real wt, const char *fn_trans,
@@ -369,6 +369,7 @@ int gmx_tcaf(int argc, char *argv[])
         nkc = NKC0;
     }
     nk  = kset_c[nkc];
+    GMX_ASSERT(nk >= 16, "Has to be over 16 because nkc is either NKC or NKC0.");
     ntc = nk*NPK;
 
     sprintf(title, "Velocity Autocorrelation Function for %s", grpname);
index 2ce02ee6cda4a8c1e633f55480fc21abf7ddc768..67a0043f1802384a59e8ca816097af20e07e6cf5 100644 (file)
@@ -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.
@@ -55,6 +55,7 @@
 #include "gromacs/utility/dir_separator.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
+#include "gromacs/utility/gmxassert.h"
 #include "gromacs/utility/smalloc.h"
 
 typedef struct {
@@ -393,6 +394,7 @@ process_directive(gmx_cpp_t *handlep, const char *dname, const char *dval)
     bIfndef = (strcmp(dname, "ifndef") == 0);
     if (bIfdef || bIfndef)
     {
+        GMX_RELEASE_ASSERT(dval, "#ifdef/#ifndef requires an argument");
         if ((handle->nifdef > 0) && (handle->ifdefs[handle->nifdef-1] != eifTRUE))
         {
             handle->nifdef++;
@@ -465,6 +467,7 @@ process_directive(gmx_cpp_t *handlep, const char *dname, const char *dval)
     /* Check for include statements */
     if (strcmp(dname, "include") == 0)
     {
+        GMX_RELEASE_ASSERT(dval, "#include requires an argument");
         len = -1;
         i0  = 0;
         for (i1 = 0; (i1 < strlen(dval)); i1++)
@@ -516,6 +519,7 @@ process_directive(gmx_cpp_t *handlep, const char *dname, const char *dval)
     /* #define statement */
     if (strcmp(dname, "define") == 0)
     {
+        GMX_RELEASE_ASSERT(dval, "#define requires an argument");
         /* Split it into name and value. */
         ptr = dval;
         while ((*ptr != '\0') && !isspace(*ptr))
@@ -537,6 +541,7 @@ process_directive(gmx_cpp_t *handlep, const char *dname, const char *dval)
     /* #undef statement */
     if (strcmp(dname, "undef") == 0)
     {
+        GMX_RELEASE_ASSERT(dval, "#undef requires an argument");
         snew(name, strlen(dval)+1);
         sscanf(dval, "%s", name);
         for (i = 0; (i < ndef); i++)
index c49ad80a76786209ea265bb92d1ac2e75008be4a..6cef9c2b501e93ac90697c16f873dcfc7d814dec 100644 (file)
@@ -580,13 +580,7 @@ static void push_bondtype(t_params     *       bt,
         if (equalEitherForwardOrBackward(bParams, testParams))
         {
             GMX_ASSERT(nrfp <= MAXFORCEPARAM, "This is ensured in other places, but we need this assert to keep the clang analyzer happy");
-            // TODO consider improving the following code by using:
-            // bool identicalParameters = std::equal(bt->param[i].c, bt->param[i].c + nrfp, b->c);
-            bool identicalParameters = true;
-            for (int j = 0; (j < nrfp); j++)
-            {
-                identicalParameters = identicalParameters && (bt->param[i].c[j] == b->c[j]);
-            }
+            const bool identicalParameters = std::equal(bt->param[i].c, bt->param[i].c + nrfp, b->c);
 
             if (!bAllowRepeat || identicalParameters)
             {
index c79f2537cd9997c9f7f3e924ccf4972022c55fdc..7ae8fc6b42327961d9e44fa9e99ecc183fa84cdc 100644 (file)
@@ -66,8 +66,8 @@
 
 /*! \brief struct for passing all data required for a function type */
 typedef struct {
-    int            ftype; /**< the function type index */
     const t_ilist *il;    /**< pointer to t_ilist entry corresponding to ftype */
+    int            ftype; /**< the function type index */
     int            nat;   /**< nr of atoms involved in a single ftype interaction */
 } ilist_data_t;
 
index 5bf972c1ae1e30b6d7131402d15fa1c0c856d0ed..5a286bfdcddf74379915274b6dde7102827f6fd9 100644 (file)
@@ -348,8 +348,10 @@ static real est_prot_area(pos_ins_t *pos_ins, rvec *r, t_block *ins_at, mem_t *m
     memmin = mem_p->zmin+0.1*(mem_p->zmax-mem_p->zmin);
     memmax = mem_p->zmax-0.1*(mem_p->zmax-mem_p->zmin);
 
+    //NOLINTNEXTLINE(clang-analyzer-security.FloatLoopCounter)
     for (x = pos_ins->xmin[XX]; x < pos_ins->xmax[XX]; x += dx)
     {
+        //NOLINTNEXTLINE(clang-analyzer-security.FloatLoopCounter)
         for (y = pos_ins->xmin[YY]; y < pos_ins->xmax[YY]; y += dy)
         {
             c   = 0;
index eb3b8ba53e36f84b814d092248cd8ed0eaad3edf..ea0c2011f6e85e07473bf746f083ff21899c7456 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 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.
@@ -87,12 +87,9 @@ nbnxn_kernel_prune_2xnn(nbnxn_pairlist_t *         nbl,
         SimdReal shZ_S   = SimdReal(shiftvec[ish3 + 2]);
 
 #if UNROLLJ <= 4
-        int      sci     = ci*STRIDE;
-        int      scix    = sci*DIM;
+        int      scix    = ci*STRIDE*DIM;
 #else
-        int      sci     = (ci >> 1)*STRIDE;
-        int      scix    = sci*DIM + (ci & 1)*(STRIDE >> 1);
-        sci             += (ci & 1)*(STRIDE >> 1);
+        int      scix    = (ci >> 1)*STRIDE*DIM + (ci & 1)*(STRIDE >> 1);
 #endif
 
         /* Load i atom data */
index 6072f56a270a1e6f095f8c06f43e4c9f1dba1da1..f310497e4016d5b4e8c81213b232a12fe0481048 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 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.
@@ -87,12 +87,9 @@ nbnxn_kernel_prune_4xn(nbnxn_pairlist_t *         nbl,
         SimdReal shZ_S   = SimdReal(shiftvec[ish3 + 2]);
 
 #if UNROLLJ <= 4
-        int      sci     = ci*STRIDE;
-        int      scix    = sci*DIM;
+        int      scix    = ci*STRIDE*DIM;
 #else
-        int      sci     = (ci >> 1)*STRIDE;
-        int      scix    = sci*DIM + (ci & 1)*(STRIDE >> 1);
-        sci             += (ci & 1)*(STRIDE >> 1);
+        int      scix    = (ci >> 1)*STRIDE*DIM + (ci & 1)*(STRIDE >> 1);
 #endif
 
         /* Load i atom data */
index 1eb0001429c56e7ea9ffe63b49456d5097b01bac..7565773a2685e3fd67724956465bbe630fe5bb61 100644 (file)
@@ -79,6 +79,7 @@ throwUnlessDerivativeIsConsistentWithFunction(const std::function<double(double)
     double                     minFail      = newRange.second;
     double                     maxFail      = newRange.first;
 
+    // NOLINTNEXTLINE(clang-analyzer-security.FloatLoopCounter)
     for (double x = newRange.first; x <= newRange.second; x += dx)
     {
         double analyticalDerivative = derivative(x);
@@ -193,6 +194,7 @@ findSmallestQuotientOfFunctionAndSecondDerivative(const std::function<double(dou
     double                     dx          = (newRange.second - newRange.first) / points;
     double                     minQuotient = GMX_REAL_MAX;
 
+    // NOLINTNEXTLINE(clang-analyzer-security.FloatLoopCounter)
     for (double x = newRange.first; x <= newRange.second; x += dx)
     {
         minQuotient = std::min(minQuotient, quotientOfFunctionAndSecondDerivative(f(x-h), f(x), f(x+h), h));
@@ -275,6 +277,7 @@ findSmallestQuotientOfFunctionAndThirdDerivative(const std::function<double(doub
     double                     dx          = (newRange.second - newRange.first) / points;
     double                     minQuotient = GMX_REAL_MAX;
 
+    // NOLINTNEXTLINE(clang-analyzer-security.FloatLoopCounter)
     for (double x = newRange.first; x <= newRange.second; x += dx)
     {
         minQuotient = std::min(minQuotient, quotientOfFunctionAndThirdDerivative(f(x-2*h), f(x-h), f(x), f(x+h), f(x+2*h), h));
index 4db21b8e1ae0cc036680bfe48f453b544bf62939..4d88270866ef1959da4bb8f38af6ef978bc560d4 100644 (file)
@@ -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.
@@ -343,10 +343,10 @@ static void analyse_other(const char ** restype, const t_atoms *atoms,
 }
 
 /*! \brief
- * Cata necessary to construct a single (protein) index group in
+ * Data necessary to construct a single (protein) index group in
  * analyse_prot().
  */
-typedef struct gmx_help_make_index_group
+typedef struct gmx_help_make_index_group // NOLINT(clang-analyzer-optin.performance.Padding)
 {
     /** The set of atom names that will be used to form this index group */
     const char **defining_atomnames;