gromacs cpp: clean up -Wunused-parameter warnings
authorAlexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Fri, 26 Jul 2013 00:08:25 +0000 (04:08 +0400)
committerTeemu Murtola <teemu.murtola@gmail.com>
Wed, 30 Oct 2013 18:54:33 +0000 (20:54 +0200)
Clean up unused function arguments in cpp code

Change-Id: I7f935d99dd6e9611b551f31c238a4c1f301335f9

29 files changed:
src/gromacs/analysisdata/modules/plot.cpp
src/gromacs/fileio/filenm.c
src/gromacs/onlinehelp/helptopic.cpp
src/gromacs/onlinehelp/wman.cpp
src/gromacs/onlinehelp/wman.h
src/gromacs/options/optionstoragetemplate.h
src/gromacs/selection/centerofmass.cpp
src/gromacs/selection/centerofmass.h
src/gromacs/selection/evaluate.cpp
src/gromacs/selection/evaluate.h
src/gromacs/selection/parsetree.cpp
src/gromacs/selection/parsetree.h
src/gromacs/selection/sm_compare.cpp
src/gromacs/selection/sm_distance.cpp
src/gromacs/selection/sm_insolidangle.cpp
src/gromacs/selection/sm_keywords.cpp
src/gromacs/selection/sm_merge.cpp
src/gromacs/selection/sm_permute.cpp
src/gromacs/selection/sm_position.cpp
src/gromacs/selection/sm_same.cpp
src/gromacs/selection/sm_simple.cpp
src/gromacs/trajectoryanalysis/cmdlinerunner.cpp
src/gromacs/trajectoryanalysis/cmdlinerunner.h
src/gromacs/trajectoryanalysis/modules/angle.cpp
src/gromacs/trajectoryanalysis/modules/freevolume.cpp
src/gromacs/trajectoryanalysis/modules/select.cpp
src/gromacs/utility/common.h
src/testutils/datatest.h
src/testutils/mock_datamodule.cpp

index da30bc44f2f4d086117db8e4c581333723d854c5..613694103314bafed8c19bd2ead230a837e69c37 100644 (file)
@@ -313,7 +313,7 @@ AbstractPlotModule::flags() const
 
 
 void
-AbstractPlotModule::dataStarted(AbstractAnalysisData * /*data*/)
+AbstractPlotModule::dataStarted(AbstractAnalysisData * /* data */)
 {
     if (!impl_->filename_.empty())
     {
index f51ea4e50cd965a45b7a6cdfeffce82f16a341f5..7cb81ca54e6424e875409fa174c83742dcba7c14 100644 (file)
@@ -384,7 +384,7 @@ void pr_fns(FILE *fp, int nf, const t_filenm tfn[])
         for (f = 0; (f < tfn[i].nfiles); f++)
         {
             sprintf(buf, "%4s %14s  %-12s ", (f == 0) ? tfn[i].opt : "",
-                    tfn[i].fns[f], (f == 0) ? fileopt(tfn[i].flag, opt_buf, 32)
+                    tfn[i].fns[f], (f == 0) ? fileopt(tfn[i].flag, opt_buf)
                     : "");
             if (f < tfn[i].nfiles - 1)
             {
index f377dda1641dc327b45ac9ea196289e22657da13..5c4e0213abd3e9a446c828b67d7594bbbb4806a2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013, by the GROMACS development team, led by
  * David van der Spoel, Berk Hess, Erik Lindahl, and including many
  * others, as listed in the AUTHORS file in the top-level source
  * directory and at http://www.gromacs.org.
@@ -78,7 +78,7 @@ bool AbstractSimpleHelpTopic::hasSubTopics() const
 }
 
 const HelpTopicInterface *
-AbstractSimpleHelpTopic::findSubTopic(const char *name) const
+AbstractSimpleHelpTopic::findSubTopic(const char * /* name */) const
 {
     return NULL;
 }
index 5979b185bdfaf76213350a801288b848993f3637..63057b1af577916d5a4362346fbfff8adb158720 100644 (file)
@@ -253,7 +253,7 @@ std::string check(const char *s, const gmx::HelpWriterContext &context)
 }
 
 #define FLAG_SET(flag, mask) ((flag &mask) == mask)
-char *fileopt(unsigned long flag, char buf[], int maxsize)
+char *fileopt(unsigned long flag, char buf[])
 {
     char tmp[256];
 
@@ -361,7 +361,7 @@ static void write_nroffman(FILE *out,
             fprintf(out, ".BI \"%s\" \" %s\" \n.B %s\n %s \n\n",
                     check(fnm[i].opt, context).c_str(),
                     check(fnm[i].fns[0], context).c_str(),
-                    check(fileopt(fnm[i].flag, tmp, 255), context).c_str(),
+                    check(fileopt(fnm[i].flag, tmp), context).c_str(),
                     check(ftp2desc(fnm[i].ftp), context).c_str());
         }
     }
@@ -504,10 +504,9 @@ static void pr_html_files(FILE *out, int nfile, t_filenm fnm[],
                 "<TD> %s </TD>"
                 "<TD> %s </TD>"
                 "</TR>\n",
-                fnm[i].opt, link, fnm[i].fns[0], fileopt(fnm[i].flag, tmp, 255),
+                fnm[i].opt, link, fnm[i].fns[0], fileopt(fnm[i].flag, tmp),
                 check(ftp2desc(fnm[i].ftp), context).c_str());
     }
-
     fprintf(out, "</TABLE>\n");
 }
 
index d87997b2c5dc670d58c6f112d4ede24e1cb58bd4..607837421ad58630e5564cbef98752c0246435d9 100644 (file)
@@ -48,7 +48,7 @@ void write_man(const char *mantp, const char *program,
                int npargs, t_pargs *pa,
                int nbug, const char **bugs);
 
-char *fileopt(unsigned long flag, char buf[], int maxsize);
+char *fileopt(unsigned long flag, char buf[]);
 /* Return a string describing the file type in flag.
  * flag should the flag field of a filenm struct.
  * You have to provide a buffer and buffer length in which
index 467a20f71e08c59de3cda05d61db039f578f81db..02187c14dd4f0f285df8da8c75ff327a95d5f328 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013, by the GROMACS development team, led by
  * David van der Spoel, Berk Hess, Erik Lindahl, and including many
  * others, as listed in the AUTHORS file in the top-level source
  * directory and at http://www.gromacs.org.
@@ -48,6 +48,7 @@
 
 #include <boost/scoped_ptr.hpp>
 
+#include "../utility/common.h"
 #include "../utility/exceptions.h"
 #include "../utility/gmxassert.h"
 
@@ -146,6 +147,7 @@ class OptionStorageTemplate : public AbstractOptionStorage
          */
         virtual void processSetValues(ValueList *values)
         {
+            GMX_UNUSED_VALUE(values);
         }
         /*! \copydoc gmx::AbstractOptionStorage::processSet()
          *
index 0a5c8c5e3cff1c2248c92a84d36c190207654af4..184efddfcf6bf146f35f1491dae3048e07d3e136 100644 (file)
 #include "gromacs/legacyheaders/pbc.h"
 #include "gromacs/legacyheaders/vec.h"
 
-/*!
- * \param[in]  top    Topology structure (unused, can be NULL).
- * \param[in]  x      Position vectors of all atoms.
- * \param[in]  nrefat Number of atoms in the index.
- * \param[in]  index  Indices of atoms.
- * \param[out] xout   COG position for the indexed atoms.
- * \returns    0 on success.
- */
 int
-gmx_calc_cog(t_topology *top, rvec x[], int nrefat, atom_id index[], rvec xout)
+gmx_calc_cog(t_topology * /* top */, rvec x[], int nrefat, atom_id index[], rvec xout)
 {
     int                 m, ai;
 
@@ -141,16 +133,8 @@ gmx_calc_cog_f(t_topology *top, rvec f[], int nrefat, atom_id index[], rvec fout
     return 0;
 }
 
-/*!
- * \param[in]  top    Topology structure (unused, can be NULL).
- * \param[in]  f      Forces on all atoms.
- * \param[in]  nrefat Number of atoms in the index.
- * \param[in]  index  Indices of atoms.
- * \param[out] fout   Force on the COM position for the indexed atoms.
- * \returns    0 on success.
- */
 int
-gmx_calc_com_f(t_topology *top, rvec f[], int nrefat, atom_id index[], rvec fout)
+gmx_calc_com_f(t_topology * /* top */, rvec f[], int nrefat, atom_id index[], rvec fout)
 {
     clear_rvec(fout);
     for (int m = 0; m < nrefat; ++m)
@@ -376,16 +360,8 @@ gmx_calc_comg_pbc(t_topology *top, rvec x[], t_pbc *pbc,
 }
 
 
-/*!
- * \param[in]  top   Topology structure (unused, can be NULL).
- * \param[in]  x     Position vectors of all atoms.
- * \param[in]  block t_block structure that divides \p index into blocks.
- * \param[in]  index Indices of atoms.
- * \param[out] xout  \p block->nr COG positions.
- * \returns    0 on success.
- */
 int
-gmx_calc_cog_block(t_topology *top, rvec x[], t_block *block, atom_id index[],
+gmx_calc_cog_block(t_topology * /* top */, rvec x[], t_block *block, atom_id index[],
                    rvec xout[])
 {
     int                 b, i, ai;
@@ -487,16 +463,8 @@ gmx_calc_cog_f_block(t_topology *top, rvec f[], t_block *block, atom_id index[],
     return 0;
 }
 
-/*!
- * \param[in]  top   Topology structure (unused, can be NULL).
- * \param[in]  f     Forces on all atoms.
- * \param[in]  block t_block structure that divides \p index into blocks.
- * \param[in]  index Indices of atoms.
- * \param[out] fout  \p block->nr Forces on COM positions.
- * \returns    0 on success.
- */
 int
-gmx_calc_com_f_block(t_topology *top, rvec f[], t_block *block, atom_id index[],
+gmx_calc_com_f_block(t_topology * /* top */, rvec f[], t_block *block, atom_id index[],
                      rvec fout[])
 {
     for (int b = 0; b < block->nr; ++b)
index 1f8c3e8eab1f6a6d0d60df7fd517a77a2977d870..cf1aedeb55d57bc6598fe9b133b920f8f930f9bd 100644 (file)
 
 #include "../legacyheaders/typedefs.h"
 
-/** Calculate a single center of geometry. */
+/*! \brief
+ * Calculate a single center of geometry.
+ *
+ * \param[in]  top    Topology structure (unused, can be NULL).
+ * \param[in]  x      Position vectors of all atoms.
+ * \param[in]  nrefat Number of atoms in the index.
+ * \param[in]  index  Indices of atoms.
+ * \param[out] xout   COG position for the indexed atoms.
+ * \returns    0 on success.
+ */
 int
 gmx_calc_cog(t_topology *top, rvec x[], int nrefat, atom_id index[], rvec xout);
 /** Calculate a single center of mass. */
@@ -85,7 +94,16 @@ gmx_calc_com(t_topology *top, rvec x[], int nrefat, atom_id index[], rvec xout);
 /** Calculate force on a single center of geometry. */
 int
 gmx_calc_cog_f(t_topology *top, rvec f[], int nrefat, atom_id index[], rvec fout);
-/** Calculate force on a single center of mass. */
+/*! \brief
+ * Calculate force on a single center of mass.
+ *
+ * \param[in]  top    Topology structure (unused, can be NULL).
+ * \param[in]  f      Forces on all atoms.
+ * \param[in]  nrefat Number of atoms in the index.
+ * \param[in]  index  Indices of atoms.
+ * \param[out] fout   Force on the COM position for the indexed atoms.
+ * \returns    0 on success.
+ */
 int
 gmx_calc_com_f(t_topology *top, rvec f[], int nrefat, atom_id index[], rvec fout);
 /** Calculate a single center of mass/geometry. */
@@ -110,7 +128,16 @@ int
 gmx_calc_comg_pbc(t_topology *top, rvec x[], t_pbc *pbc,
                   int nrefat, atom_id index[], bool bMass, rvec xout);
 
-/** Calculate centers of geometry for a blocked index. */
+/*! \brief
+ * Calculate centers of geometry for a blocked index.
+ *
+ * \param[in]  top   Topology structure (unused, can be NULL).
+ * \param[in]  x     Position vectors of all atoms.
+ * \param[in]  block t_block structure that divides \p index into blocks.
+ * \param[in]  index Indices of atoms.
+ * \param[out] xout  \p block->nr COG positions.
+ * \returns    0 on success.
+ */
 int
 gmx_calc_cog_block(t_topology *top, rvec x[], t_block *block,
                    atom_id index[], rvec xout[]);
@@ -122,7 +149,16 @@ gmx_calc_com_block(t_topology *top, rvec x[], t_block *block,
 int
 gmx_calc_cog_f_block(t_topology *top, rvec f[], t_block *block,
                      atom_id index[], rvec fout[]);
-/** Calculate forces on centers of mass for a blocked index. */
+/*! \brief
+ * Calculate forces on centers of mass for a blocked index.
+ *
+ * \param[in]  top   Topology structure (unused, can be NULL).
+ * \param[in]  f     Forces on all atoms.
+ * \param[in]  block t_block structure that divides \p index into blocks.
+ * \param[in]  index Indices of atoms.
+ * \param[out] fout  \p block->nr Forces on COM positions.
+ * \returns    0 on success.
+ */
 int
 gmx_calc_com_f_block(t_topology *top, rvec f[], t_block *block,
                      atom_id index[], rvec fout[]);
index cb002c2818595ebb1f5e99862d3955bf1051969f..04f21e844b4354b60d8783d095c3786909a5b6f4 100644 (file)
@@ -480,25 +480,10 @@ _gmx_sel_evaluate_children(gmx_sel_evaluate_t                *data,
     }
 }
 
-/*!
- * \param[in] data Data for the current frame.
- * \param[in] sel Selection element being evaluated.
- * \param[in] g   Group for which \p sel should be evaluated
- *   (not used, can be NULL).
- * \returns   0 on success, a non-zero error code on error.
- *
- * Evaluates the first child element in the group defined by \p sel->u.cgrp.
- * If \p sel->u.cgrp is empty, nothing is done.
- * The value of \p sel is not touched (root elements do not evaluate to
- * values).
- *
- * This function can be used as gmx::SelectionTreeElement::evaluate for
- * \ref SEL_ROOT elements.
- */
 void
-_gmx_sel_evaluate_root(gmx_sel_evaluate_t                *data,
-                       const SelectionTreeElementPointer &sel,
-                       gmx_ana_index_t                   *g)
+_gmx_sel_evaluate_root(gmx_sel_evaluate_t                     *data,
+                       const gmx::SelectionTreeElementPointer &sel,
+                       gmx_ana_index_t                         * /* g */)
 {
     if (sel->u.cgrp.isize == 0 || !sel->child->evaluate)
     {
@@ -509,21 +494,10 @@ _gmx_sel_evaluate_root(gmx_sel_evaluate_t                *data,
                          sel->u.cgrp.isize < 0 ? NULL : &sel->u.cgrp);
 }
 
-/*!
- * \param[in] data Data for the current frame.
- * \param[in] sel Selection element being evaluated.
- * \param[in] g   Group for which \p sel should be evaluated.
- * \returns   0 for success.
- *
- * Sets the value of \p sel to the intersection of \p g and \p sel->u.cgrp.
- *
- * This function can be used as gmx::SelectionTreeElement::evaluate for
- * \ref SEL_CONST elements with value type \ref GROUP_VALUE.
- */
 void
-_gmx_sel_evaluate_static(gmx_sel_evaluate_t                *data,
-                         const SelectionTreeElementPointer &sel,
-                         gmx_ana_index_t                   *g)
+_gmx_sel_evaluate_static(gmx_sel_evaluate_t                      * /* data */,
+                         const gmx::SelectionTreeElementPointer &sel,
+                         gmx_ana_index_t                        *g)
 {
     gmx_ana_index_intersection(sel->v.u.g, &sel->u.cgrp, g);
 }
index 8be9c9a1b4a45672316a5361d61abdca04b85779..ef904feb1dbcc69e0be29b8af4985e1764e63304 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013, by the GROMACS development team, led by
  * David van der Spoel, Berk Hess, 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,12 +97,40 @@ _gmx_sel_evaluate_method_params(gmx_sel_evaluate_t                     *data,
 /*! \name Misc. evaluation functions
  */
 /*@{*/
-/** Evaluates a root selection element. */
+/*! \brief
+ * Evaluates a root selection element.
+ *
+ * \param[in] data Data for the current frame.
+ * \param[in] sel Selection element being evaluated.
+ * \param[in] g   Group for which \p sel should be evaluated
+ *   (not used, can be NULL).
+ * \returns   0 on success, a non-zero error code on error.
+ *
+ * Evaluates the first child element in the group defined by \p sel->u.cgrp.
+ * If \p sel->u.cgrp is empty, nothing is done.
+ * The value of \p sel is not touched (root elements do not evaluate to
+ * values).
+ *
+ * This function can be used as gmx::SelectionTreeElement::evaluate for
+ * \ref SEL_ROOT elements.
+ */
 void
 _gmx_sel_evaluate_root(gmx_sel_evaluate_t                     *data,
                        const gmx::SelectionTreeElementPointer &sel,
                        gmx_ana_index_t                        *g);
-/** Evaluates a static group selection element. */
+/*! \brief
+ * Evaluates a static group selection element.
+ *
+ * \param[in] data Data for the current frame.
+ * \param[in] sel Selection element being evaluated.
+ * \param[in] g   Group for which \p sel should be evaluated.
+ * \returns   0 for success.
+ *
+ * Sets the value of \p sel to the intersection of \p g and \p sel->u.cgrp.
+ *
+ * This function can be used as gmx::SelectionTreeElement::evaluate for
+ * \ref SEL_CONST elements with value type \ref GROUP_VALUE.
+ */
 void
 _gmx_sel_evaluate_static(gmx_sel_evaluate_t                     *data,
                          const gmx::SelectionTreeElementPointer &sel,
index 7322ad828a6f8853bbdfda3b968581e9f5fa9d08..de83a6f3e8299d24298ce0e8f623aff9b12844f3 100644 (file)
@@ -569,20 +569,10 @@ set_refpos_type(gmx::PositionCalculationCollection *pcc,
     }
 }
 
-/*!
- * \param[in]  left    Selection element for the left hand side.
- * \param[in]  right   Selection element for the right hand side.
- * \param[in]  op      String representation of the operator.
- * \param[in]  scanner Scanner data structure.
- * \returns    The created selection element.
- *
- * This function handles the creation of a gmx::SelectionTreeElement object for
- * arithmetic expressions.
- */
-SelectionTreeElementPointer
-_gmx_sel_init_arithmetic(const SelectionTreeElementPointer &left,
-                         const SelectionTreeElementPointer &right,
-                         char op, yyscan_t scanner)
+gmx::SelectionTreeElementPointer
+_gmx_sel_init_arithmetic(const gmx::SelectionTreeElementPointer &left,
+                         const gmx::SelectionTreeElementPointer &right,
+                         char op, yyscan_t /* scanner */)
 {
     SelectionTreeElementPointer sel(new SelectionTreeElement(SEL_ARITHMETIC));
     sel->v.type        = REAL_VALUE;
index 8083dd7d5a531828ba5bdeff7d9a8430ab9e4c9f..f68126c0d4418516b84ed31f534f085162f67460 100644 (file)
@@ -396,11 +396,26 @@ void
 _gmx_selelem_set_method(const gmx::SelectionTreeElementPointer &sel,
                         struct gmx_ana_selmethod_t *method, void *scanner);
 
-/** Creates a gmx::SelectionTreeElement for arithmetic expression evaluation. */
+/* An opaque pointer. */
+#ifndef YY_TYPEDEF_YY_SCANNER_T
+#define YY_TYPEDEF_YY_SCANNER_T
+typedef void* yyscan_t;
+#endif
+/** \brief Creates a gmx::SelectionTreeElement for arithmetic expression evaluation.
+ *
+ * \param[in]  left    Selection element for the left hand side.
+ * \param[in]  right   Selection element for the right hand side.
+ * \param[in]  op      String representation of the operator.
+ * \param[in]  scanner Scanner data structure.
+ * \returns    The created selection element.
+ *
+ * This function handles the creation of a gmx::SelectionTreeElement object for
+ * arithmetic expressions.
+ */
 gmx::SelectionTreeElementPointer
 _gmx_sel_init_arithmetic(const gmx::SelectionTreeElementPointer &left,
                          const gmx::SelectionTreeElementPointer &right,
-                         char op, void *scanner);
+                         char op, yyscan_t scanner);
 /** Creates a gmx::SelectionTreeElement for comparsion expression evaluation. */
 gmx::SelectionTreeElementPointer
 _gmx_sel_init_comparison(const gmx::SelectionTreeElementPointer &left,
index 1849c1f60dcb69f74bf4a13b09ef8a79acb9a97d..1c7c74db7cc78d223b27f0dcfc9f60d4dc0d186a 100644 (file)
@@ -44,6 +44,7 @@
 #include "gromacs/legacyheaders/smalloc.h"
 
 #include "gromacs/selection/selmethod.h"
+#include "gromacs/utility/common.h"
 #include "gromacs/utility/exceptions.h"
 
 /** Defines the comparison operator for comparison expressions. */
@@ -97,10 +98,27 @@ typedef struct
     t_compare_value  right;
 } t_methoddata_compare;
 
-/** Allocates data for comparison expression evaluation. */
+/*! \brief
+ * Allocates data for comparison expression evaluation.
+ *
+ * \param[in]     npar  Not used (should be 5).
+ * \param[in,out] param Method parameters (should point to a copy of
+ *   \ref smparams_compare).
+ * \returns       Pointer to the allocated data (\c t_methoddata_compare).
+ *
+ * Allocates memory for a \c t_methoddata_compare structure.
+ */
 static void *
 init_data_compare(int npar, gmx_ana_selparam_t *param);
-/** Initializes data for comparison expression evaluation. */
+/*! \brief
+ * Initializes data for comparison expression evaluation.
+ *
+ * \param[in] top   Not used.
+ * \param[in] npar  Not used (should be 5).
+ * \param[in] param Method parameters (should point to \ref smparams_compare).
+ * \param[in] data  Should point to a \c t_methoddata_compare.
+ * \returns   0 if the input data is valid, -1 on error.
+ */
 static void
 init_compare(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
 /** Frees the memory allocated for comparison expression evaluation. */
@@ -236,16 +254,8 @@ _gmx_selelem_print_compare_info(FILE *fp, void *data)
     fprintf(fp, "\"");
 }
 
-/*!
- * \param[in]     npar  Not used (should be 5).
- * \param[in,out] param Method parameters (should point to a copy of
- *   \ref smparams_compare).
- * \returns       Pointer to the allocated data (\c t_methoddata_compare).
- *
- * Allocates memory for a \c t_methoddata_compare structure.
- */
 static void *
-init_data_compare(int npar, gmx_ana_selparam_t *param)
+init_data_compare(int /* npar */, gmx_ana_selparam_t *param)
 {
     t_methoddata_compare *data;
 
@@ -391,15 +401,8 @@ convert_real_int(int n, t_compare_value *val, e_comparison_t cmpt, bool bRight)
     val->flags |= CMP_ALLOCINT;
 }
 
-/*!
- * \param[in] top   Not used.
- * \param[in] npar  Not used (should be 5).
- * \param[in] param Method parameters (should point to \ref smparams_compare).
- * \param[in] data  Should point to a \c t_methoddata_compare.
- * \returns   0 if the input data is valid, -1 on error.
- */
 static void
-init_compare(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_compare(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t *param, void *data)
 {
     t_methoddata_compare *d = (t_methoddata_compare *)data;
     int                   n1, n2;
@@ -490,7 +493,9 @@ free_data_compare(void *data)
     sfree(d);
 }
 
-/*!
+/*! \brief
+ * Implementation for evaluate_compare() for integer values.
+ *
  * \param[in]  top   Not used.
  * \param[in]  fr    Not used.
  * \param[in]  pbc   Not used.
@@ -507,6 +512,9 @@ evaluate_compare_int(t_topology *top, t_trxframe *fr, t_pbc *pbc,
     int                   a, b;
     bool                  bAccept;
 
+    GMX_UNUSED_VALUE(top);
+    GMX_UNUSED_VALUE(fr);
+    GMX_UNUSED_VALUE(pbc);
     for (i = i1 = i2 = ig = 0; i < g->isize; ++i)
     {
         a       = d->left.i[i1];
@@ -538,13 +546,18 @@ evaluate_compare_int(t_topology *top, t_trxframe *fr, t_pbc *pbc,
     out->u.g->isize = ig;
 }
 
-/*!
+/*! \brief
+ * Implementation for evaluate_compare() if either value is non-integer.
+ *
  * \param[in]  top   Not used.
  * \param[in]  fr    Not used.
  * \param[in]  pbc   Not used.
  * \param[in]  g     Evaluation index group.
  * \param[out] out   Output data structure (\p out->u.g is used).
  * \param[in]  data  Should point to a \c t_methoddata_compare.
+ *
+ * Left value is assumed to be real-valued; right value can be either.
+ * This is ensured by the initialization method.
  */
 static void
 evaluate_compare_real(t_topology *top, t_trxframe *fr, t_pbc *pbc,
@@ -555,6 +568,9 @@ evaluate_compare_real(t_topology *top, t_trxframe *fr, t_pbc *pbc,
     real                  a, b;
     bool                  bAccept;
 
+    GMX_UNUSED_VALUE(top);
+    GMX_UNUSED_VALUE(fr);
+    GMX_UNUSED_VALUE(pbc);
     for (i = i1 = i2 = ig = 0; i < g->isize; ++i)
     {
         a       = d->left.r[i1];
index f1aba319f90c3468fb55bdbd8a50bc5c0cc83347..8390c46ce621219776fc3589f5ab67c4a42baefe 100644 (file)
@@ -75,25 +75,63 @@ struct t_methoddata_distance
     gmx::AnalysisNeighborhoodSearch  nbsearch;
 };
 
-/** Allocates data for distance-based selection methods. */
+/*! \brief
+ * Allocates data for distance-based selection methods.
+ *
+ * \param[in]     npar  Not used (should be 2).
+ * \param[in,out] param Method parameters (should point to one of the distance
+ *   parameter arrays).
+ * \returns       Pointer to the allocated data (\c t_methoddata_distance).
+ *
+ * Allocates memory for a \c t_methoddata_distance structure and
+ * initializes the parameter as follows:
+ *  - the first parameter defines the value for
+ *    \c t_methoddata_distance::cutoff.
+ *  - the second parameter defines the reference positions and the value is
+ *    stored in \c t_methoddata_distance::p.
+ */
 static void *
 init_data_common(int npar, gmx_ana_selparam_t *param);
-/** Initializes a distance-based selection method. */
+/*! \brief
+ * Initializes a distance-based selection method.
+ *
+ * \param   top   Not used.
+ * \param   npar  Not used (should be 2).
+ * \param   param Method parameters (should point to one of the distance
+ *   parameter arrays).
+ * \param   data  Pointer to \c t_methoddata_distance to initialize.
+ * \returns 0 on success, a non-zero error code on failure.
+ *
+ * Initializes the neighborhood search data structure
+ * (\c t_methoddata_distance::nb).
+ * Also checks that the cutoff is valid.
+ */
 static void
 init_common(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
 /** Frees the data allocated for a distance-based selection method. */
 static void
 free_data_common(void *data);
-/** Initializes the evaluation of a distance-based within selection method for a frame. */
+/*! \brief
+ * Initializes the evaluation of a distance-based within selection method for a
+ * frame.
+ *
+ * \param[in]  top  Not used.
+ * \param[in]  fr   Current frame.
+ * \param[in]  pbc  PBC structure.
+ * \param      data Should point to a \c t_methoddata_distance.
+ * \returns    0 on success, a non-zero error code on error.
+ *
+ * Initializes the neighborhood search for the current frame.
+ */
 static void
-init_frame_common(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data);
+init_frame_common(t_topology *top, t_trxframe * fr, t_pbc *pbc, void *data);
 /** Evaluates the \p distance selection method. */
 static void
-evaluate_distance(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_distance(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                   gmx_ana_pos_t *pos, gmx_ana_selvalue_t *out, void *data);
 /** Evaluates the \p within selection method. */
 static void
-evaluate_within(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_within(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                 gmx_ana_pos_t *pos, gmx_ana_selvalue_t *out, void *data);
 
 /** Parameters for the \p distance selection method. */
@@ -180,21 +218,8 @@ gmx_ana_selmethod_t sm_within = {
     {"within REAL of POS_EXPR", asize(help_distance), help_distance},
 };
 
-/*!
- * \param[in]     npar  Not used (should be 2).
- * \param[in,out] param Method parameters (should point to one of the distance
- *   parameter arrays).
- * \returns       Pointer to the allocated data (\c t_methoddata_distance).
- *
- * Allocates memory for a \c t_methoddata_distance structure and
- * initializes the parameter as follows:
- *  - the first parameter defines the value for
- *    \c t_methoddata_distance::cutoff.
- *  - the second parameter defines the reference positions and the value is
- *    stored in \c t_methoddata_distance::p.
- */
 static void *
-init_data_common(int npar, gmx_ana_selparam_t *param)
+init_data_common(int /* npar */, gmx_ana_selparam_t *param)
 {
     t_methoddata_distance *data = new t_methoddata_distance();
     param[0].val.u.r = &data->cutoff;
@@ -202,20 +227,8 @@ init_data_common(int npar, gmx_ana_selparam_t *param)
     return data;
 }
 
-/*!
- * \param   top   Not used.
- * \param   npar  Not used (should be 2).
- * \param   param Method parameters (should point to one of the distance
- *   parameter arrays).
- * \param   data  Pointer to \c t_methoddata_distance to initialize.
- * \returns 0 on success, a non-zero error code on failure.
- *
- * Initializes the neighborhood search data structure
- * (\c t_methoddata_distance::nb).
- * Also checks that the cutoff is valid.
- */
 static void
-init_common(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_common(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t *param, void *data)
 {
     t_methoddata_distance *d = (t_methoddata_distance *)data;
 
@@ -238,17 +251,8 @@ free_data_common(void *data)
     delete static_cast<t_methoddata_distance *>(data);
 }
 
-/*!
- * \param[in]  top  Not used.
- * \param[in]  fr   Current frame.
- * \param[in]  pbc  PBC structure.
- * \param      data Should point to a \c t_methoddata_distance.
- * \returns    0 on success, a non-zero error code on error.
- *
- * Initializes the neighborhood search for the current frame.
- */
 static void
-init_frame_common(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data)
+init_frame_common(t_topology * /* top */, t_trxframe * /* fr */, t_pbc *pbc, void *data)
 {
     t_methoddata_distance *d = (t_methoddata_distance *)data;
 
@@ -265,7 +269,7 @@ init_frame_common(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data)
  * and puts them in \p out->u.r.
  */
 static void
-evaluate_distance(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_distance(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                   gmx_ana_pos_t *pos, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_distance *d = (t_methoddata_distance *)data;
@@ -289,7 +293,7 @@ evaluate_distance(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * \c t_methoddata_distance::xref and puts them in \p out.g.
  */
 static void
-evaluate_within(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_within(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                 gmx_ana_pos_t *pos, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_distance *d = (t_methoddata_distance *)data;
index 5b3b62bea54fa31cd431c2613f30ebf73e2b543c..7149a3454135840385e69e17e33e25f2dbd2d8de 100644 (file)
@@ -226,24 +226,58 @@ typedef struct
     t_spheresurfacebin *bin;
 } t_methoddata_insolidangle;
 
-/** Allocates data for the \p insolidangle selection method. */
+/*! \brief
+ * Allocates data for the \p insolidangle selection method.
+ *
+ * \param[in]     npar  Not used (should be 3).
+ * \param[in,out] param Method parameters (should point to
+ *   \ref smparams_insolidangle).
+ * \returns Pointer to the allocated data (\ref t_methoddata_insolidangle).
+ *
+ * Allocates memory for a \ref t_methoddata_insolidangle structure and
+ * initializes the parameter as follows:
+ *  - \p center defines the value for t_methoddata_insolidangle::center.
+ *  - \p span   defines the value for t_methoddata_insolidangle::span.
+ *  - \p cutoff defines the value for t_methoddata_insolidangle::angcut.
+ */
 static void *
 init_data_insolidangle(int npar, gmx_ana_selparam_t *param);
-/** Initializes the \p insolidangle selection method. */
+/*! \brief
+ * Initializes the \p insolidangle selection method.
+ *
+ * \param   top  Not used.
+ * \param   npar Not used.
+ * \param   param Not used.
+ * \param   data Pointer to \ref t_methoddata_insolidangle to initialize.
+ * \returns 0 on success, -1 on failure.
+ *
+ * Converts t_methoddata_insolidangle::angcut to radians and allocates
+ * and allocates memory for the bins used during the evaluation.
+ */
 static void
-init_insolidangle(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
+init_insolidangle(t_topology * top, int npar, gmx_ana_selparam_t * param, void *data);
 /** Frees the data allocated for the \p insolidangle selection method. */
 static void
 free_data_insolidangle(void *data);
-/** Initializes the evaluation of the \p insolidangle selection method for a frame. */
+/*! \brief
+ * Initializes the evaluation of the \p insolidangle selection method for a frame.
+ *
+ * \param[in]  top  Not used.
+ * \param[in]  fr   Not used.
+ * \param[in]  pbc  PBC structure.
+ * \param      data Should point to a \ref t_methoddata_insolidangle.
+ *
+ * Creates a lookup structure that enables fast queries of whether a point
+ * is within the solid angle or not.
+ */
 static void
-init_frame_insolidangle(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data);
+init_frame_insolidangle(t_topology * top, t_trxframe * fr, t_pbc *pbc, void *data);
 /** Internal helper function for evaluate_insolidangle(). */
 static bool
 accept_insolidangle(rvec x, t_pbc *pbc, void *data);
 /** Evaluates the \p insolidangle selection method. */
 static void
-evaluate_insolidangle(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_insolidangle(t_topology * /* top */, t_trxframe * /* fr */, t_pbc *pbc,
                       gmx_ana_pos_t *pos, gmx_ana_selvalue_t *out, void *data);
 
 /** Calculates the distance between unit vectors. */
@@ -275,7 +309,13 @@ update_surface_bin(t_methoddata_insolidangle *surf, int tbin,
 /** Adds a single reference point and updates the surface bins. */
 static void
 store_surface_point(t_methoddata_insolidangle *surf, rvec x);
-/** Optimizes the surface bins for faster searching. */
+/*! \brief
+ * Optimizes the surface bins for faster searching.
+ *
+ * \param[in,out] surf Surface data structure.
+ *
+ * Currently, this function does nothing.
+ */
 static void
 optimize_surface_points(t_methoddata_insolidangle *surf);
 /** Estimates the area covered by the reference cones. */
@@ -327,20 +367,8 @@ gmx_ana_selmethod_t sm_insolidangle = {
      asize(help_insolidangle), help_insolidangle},
 };
 
-/*!
- * \param[in]     npar  Not used (should be 3).
- * \param[in,out] param Method parameters (should point to
- *   \ref smparams_insolidangle).
- * \returns Pointer to the allocated data (\ref t_methoddata_insolidangle).
- *
- * Allocates memory for a \ref t_methoddata_insolidangle structure and
- * initializes the parameter as follows:
- *  - \p center defines the value for t_methoddata_insolidangle::center.
- *  - \p span   defines the value for t_methoddata_insolidangle::span.
- *  - \p cutoff defines the value for t_methoddata_insolidangle::angcut.
- */
 static void *
-init_data_insolidangle(int npar, gmx_ana_selparam_t *param)
+init_data_insolidangle(int /* npar */, gmx_ana_selparam_t *param)
 {
     t_methoddata_insolidangle *data = new t_methoddata_insolidangle();
     data->angcut        = 5.0;
@@ -362,18 +390,8 @@ init_data_insolidangle(int npar, gmx_ana_selparam_t *param)
     return data;
 }
 
-/*!
- * \param   top  Not used.
- * \param   npar Not used.
- * \param   param Not used.
- * \param   data Pointer to \ref t_methoddata_insolidangle to initialize.
- * \returns 0 on success, -1 on failure.
- *
- * Converts t_methoddata_insolidangle::angcut to radians and allocates
- * and allocates memory for the bins used during the evaluation.
- */
 static void
-init_insolidangle(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_insolidangle(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t * /* param */, void *data)
 {
     t_methoddata_insolidangle *surf = (t_methoddata_insolidangle *)data;
     int                        i, c;
@@ -430,17 +448,8 @@ free_data_insolidangle(void *data)
     delete d;
 }
 
-/*!
- * \param[in]  top  Not used.
- * \param[in]  fr   Current frame.
- * \param[in]  pbc  PBC structure.
- * \param      data Should point to a \ref t_methoddata_insolidangle.
- *
- * Creates a lookup structure that enables fast queries of whether a point
- * is within the solid angle or not.
- */
 static void
-init_frame_insolidangle(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data)
+init_frame_insolidangle(t_topology * /* top */, t_trxframe * /* fr */, t_pbc *pbc, void *data)
 {
     t_methoddata_insolidangle *d = (t_methoddata_insolidangle *)data;
     rvec                       dx;
@@ -498,7 +507,7 @@ accept_insolidangle(rvec x, t_pbc *pbc, void *data)
  * \c t_methoddata_insolidangle::center, and stores the result in \p out->u.g.
  */
 static void
-evaluate_insolidangle(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_insolidangle(t_topology * /* top */, t_trxframe * /* fr */, t_pbc *pbc,
                       gmx_ana_pos_t *pos, gmx_ana_selvalue_t *out, void *data)
 {
     out->u.g->isize = 0;
@@ -938,13 +947,8 @@ store_surface_point(t_methoddata_insolidangle *surf, rvec x)
     }
 }
 
-/*!
- * \param[in,out] surf Surface data structure.
- *
- * Currently, this function does nothing.
- */
 static void
-optimize_surface_points(t_methoddata_insolidangle *surf)
+optimize_surface_points(t_methoddata_insolidangle * /* surf */)
 {
     /* TODO: Implement */
 }
index dd0124dd5d555d2504a3433efc47972d1dfae3f8..4fac8820593338ede67ee30d3772473d1d347838 100644 (file)
 #include "scanner.h"
 #include "selelem.h"
 
-/** Allocates data for integer keyword evaluation. */
+/*! \brief
+ * Allocates data for integer keyword evaluation.
+ *
+ * \param[in] npar  Not used.
+ * \param     param Not used.
+ * \returns   Pointer to the allocated data (\ref t_methoddata_kwint).
+ *
+ * Allocates memory for a \ref t_methoddata_kwint structure.
+ */
 static void *
-init_data_kwint(int npar, gmx_ana_selparam_t *param);
-/** Allocates data for real keyword evaluation. */
+init_data_kwint(int  npar, gmx_ana_selparam_t * param);
+/*! \brief
+ * Allocates data for real keyword evaluation.
+ *
+ * \param[in] npar  Not used.
+ * \param     param Not used.
+ * \returns   Pointer to the allocated data (\ref t_methoddata_kwreal).
+ *
+ * Allocates memory for a \ref t_methoddata_kwreal structure.
+ */
 static void *
-init_data_kwreal(int npar, gmx_ana_selparam_t *param);
-/** Allocates data for string keyword evaluation. */
+init_data_kwreal(int npar, gmx_ana_selparam_t * param);
+/*! \brief
+ * Allocates data for string keyword evaluation.
+ *
+ * \param[in] npar  Not used.
+ * \param     param Not used.
+ * \returns Pointer to the allocated data (t_methoddata_kwstr).
+ *
+ * Allocates memory for a t_methoddata_kwstr structure.
+ */
 static void *
-init_data_kwstr(int npar, gmx_ana_selparam_t *param);
-/** Initializes data for integer keyword evaluation. */
+init_data_kwstr(int npar, gmx_ana_selparam_t * param);
+/** /brief Initializes data for integer keyword evaluation.
+ *
+ * \param[in] top   Not used.
+ * \param[in] npar  Not used (should be 2).
+ * \param[in] param Method parameters (should point to \ref smparams_keyword_int).
+ * \param[in] data  Should point to \ref t_methoddata_kwint.
+ */
 static void
 init_kwint(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
-/** Initializes data for real keyword evaluation. */
+/*! \brief
+ * Initializes data for real keyword evaluation.
+ *
+ * \param[in] top   Not used.
+ * \param[in] npar  Not used (should be 2).
+ * \param[in] param Method parameters (should point to \ref smparams_keyword_real).
+ * \param[in] data  Should point to \ref t_methoddata_kwreal.
+ * \returns   0 (the initialization always succeeds).
+ */
 static void
 init_kwreal(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
-/** Initializes data for string keyword evaluation. */
+/*! \brief
+ * Initializes data for string keyword evaluation.
+ *
+ * \param[in] top   Not used.
+ * \param[in] npar  Not used (should be 2).
+ * \param[in] param Method parameters (should point to \ref smparams_keyword_str).
+ * \param[in] data  Should point to t_methoddata_kwstr.
+ */
 static void
 init_kwstr(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
 /** Frees the memory allocated for string keyword evaluation. */
@@ -85,15 +130,15 @@ static void
 free_data_kwstr(void *data);
 /** Evaluates integer selection keywords. */
 static void
-evaluate_keyword_int(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_keyword_int(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                      gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data);
 /** Evaluates real selection keywords. */
 static void
-evaluate_keyword_real(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_keyword_real(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                       gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data);
 /** Evaluates string selection keywords. */
 static void
-evaluate_keyword_str(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_keyword_str(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                      gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data);
 
 /*! \internal \brief
@@ -288,10 +333,27 @@ gmx_ana_selmethod_t sm_keyword_str = {
     {NULL, 0, NULL},
 };
 
-/** Initializes keyword evaluation for an arbitrary group. */
+/*! \brief
+ * Initializes keyword evaluation for an arbitrary group.
+ *
+ * \param[in] top   Not used.
+ * \param[in] npar  Not used.
+ * \param[in] param Not used.
+ * \param[in] data  Should point to \ref t_methoddata_kweval.
+ * \returns   0 on success, a non-zero error code on return.
+ *
+ * Calls the initialization method of the wrapped keyword.
+ */
 static void
-init_kweval(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
-/** Initializes output for keyword evaluation in an arbitrary group. */
+init_kweval(t_topology *top, int npar, gmx_ana_selparam_t * param, void *data);
+/*! \brief
+ * Initializes output for keyword evaluation in an arbitrary group.
+ *
+ * \param[in]     top   Not used.
+ * \param[in,out] out   Pointer to output data structure.
+ * \param[in,out] data  Should point to \c t_methoddata_kweval.
+ * \returns       0 for success.
+ */
 static void
 init_output_kweval(t_topology *top, gmx_ana_selvalue_t *out, void *data);
 /** Frees the data allocated for keyword evaluation in an arbitrary group. */
@@ -302,8 +364,7 @@ static void
 init_frame_kweval(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data);
 /** Evaluates keywords in an arbitrary group. */
 static void
-evaluate_kweval(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data);
+evaluate_kweval(t_topology *top, t_trxframe *fr, t_pbc *pbc, gmx_ana_index_t * /* g */, gmx_ana_selvalue_t *out, void *data);
 
 /*! \internal \brief
  * Data structure for keyword evaluation in arbitrary groups.
@@ -328,15 +389,8 @@ static gmx_ana_selparam_t smparams_kweval[] = {
  * INTEGER KEYWORD EVALUATION
  ********************************************************************/
 
-/*!
- * \param[in] npar  Not used.
- * \param     param Not used.
- * \returns   Pointer to the allocated data (\ref t_methoddata_kwint).
- *
- * Allocates memory for a \ref t_methoddata_kwint structure.
- */
 static void *
-init_data_kwint(int npar, gmx_ana_selparam_t *param)
+init_data_kwint(int  /* npar */, gmx_ana_selparam_t * /* param */)
 {
     t_methoddata_kwint *data;
 
@@ -344,14 +398,8 @@ init_data_kwint(int npar, gmx_ana_selparam_t *param)
     return data;
 }
 
-/*!
- * \param[in] top   Not used.
- * \param[in] npar  Not used (should be 2).
- * \param[in] param Method parameters (should point to \ref smparams_keyword_int).
- * \param[in] data  Should point to \ref t_methoddata_kwint.
- */
 static void
-init_kwint(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_kwint(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t *param, void *data)
 {
     t_methoddata_kwint *d = (t_methoddata_kwint *)data;
 
@@ -369,7 +417,7 @@ init_kwint(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
  * Matching atoms are stored in \p out->u.g.
  */
 static void
-evaluate_keyword_int(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_keyword_int(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                      gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_kwint *d = (t_methoddata_kwint *)data;
@@ -416,15 +464,8 @@ evaluate_keyword_int(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * REAL KEYWORD EVALUATION
  ********************************************************************/
 
-/*!
- * \param[in] npar  Not used.
- * \param     param Not used.
- * \returns   Pointer to the allocated data (\ref t_methoddata_kwreal).
- *
- * Allocates memory for a \ref t_methoddata_kwreal structure.
- */
 static void *
-init_data_kwreal(int npar, gmx_ana_selparam_t *param)
+init_data_kwreal(int /* npar */, gmx_ana_selparam_t * /* param */)
 {
     t_methoddata_kwreal *data;
 
@@ -432,15 +473,8 @@ init_data_kwreal(int npar, gmx_ana_selparam_t *param)
     return data;
 }
 
-/*!
- * \param[in] top   Not used.
- * \param[in] npar  Not used (should be 2).
- * \param[in] param Method parameters (should point to \ref smparams_keyword_real).
- * \param[in] data  Should point to \ref t_methoddata_kwreal.
- * \returns   0 (the initialization always succeeds).
- */
 static void
-init_kwreal(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_kwreal(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t *param, void *data)
 {
     t_methoddata_kwreal *d = (t_methoddata_kwreal *)data;
 
@@ -458,7 +492,7 @@ init_kwreal(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
  * Matching atoms are stored in \p out->u.g.
  */
 static void
-evaluate_keyword_real(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_keyword_real(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                       gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_kwreal *d = (t_methoddata_kwreal *)data;
@@ -505,15 +539,8 @@ evaluate_keyword_real(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * STRING KEYWORD EVALUATION
  ********************************************************************/
 
-/*!
- * \param[in] npar  Not used.
- * \param     param Not used.
- * \returns Pointer to the allocated data (t_methoddata_kwstr).
- *
- * Allocates memory for a t_methoddata_kwstr structure.
- */
 static void *
-init_data_kwstr(int npar, gmx_ana_selparam_t *param)
+init_data_kwstr(int /* npar */, gmx_ana_selparam_t * /* param */)
 {
     t_methoddata_kwstr *data = new t_methoddata_kwstr();
     data->matchType = gmx::eStringMatchType_Auto;
@@ -540,14 +567,8 @@ _gmx_selelem_set_kwstr_match_type(const gmx::SelectionTreeElementPointer &sel,
     d->matchType = matchType;
 }
 
-/*!
- * \param[in] top   Not used.
- * \param[in] npar  Not used (should be 2).
- * \param[in] param Method parameters (should point to \ref smparams_keyword_str).
- * \param[in] data  Should point to t_methoddata_kwstr.
- */
 static void
-init_kwstr(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_kwstr(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t *param, void *data)
 {
     t_methoddata_kwstr *d = static_cast<t_methoddata_kwstr *>(data);
 
@@ -586,7 +607,7 @@ free_data_kwstr(void *data)
  * Matching atoms are stored in \p out->u.g.
  */
 static void
-evaluate_keyword_str(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_keyword_str(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                      gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_kwstr *d = static_cast<t_methoddata_kwstr *>(data);
@@ -610,31 +631,16 @@ evaluate_keyword_str(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * KEYWORD EVALUATION FOR ARBITRARY GROUPS
  ********************************************************************/
 
-/*!
- * \param[in] top   Not used.
- * \param[in] npar  Not used.
- * \param[in] param Not used.
- * \param[in] data  Should point to \ref t_methoddata_kweval.
- * \returns   0 on success, a non-zero error code on return.
- *
- * Calls the initialization method of the wrapped keyword.
- */
 static void
-init_kweval(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_kweval(t_topology *top, int /* npar */, gmx_ana_selparam_t * /* param */, void *data)
 {
     t_methoddata_kweval *d = (t_methoddata_kweval *)data;
 
     d->kwmethod->init(top, 0, NULL, d->kwmdata);
 }
 
-/*!
- * \param[in]     top   Not used.
- * \param[in,out] out   Pointer to output data structure.
- * \param[in,out] data  Should point to \c t_methoddata_kweval.
- * \returns       0 for success.
- */
 static void
-init_output_kweval(t_topology *top, gmx_ana_selvalue_t *out, void *data)
+init_output_kweval(t_topology * /* top */, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_kweval *d = (t_methoddata_kweval *)data;
 
@@ -684,7 +690,7 @@ init_frame_kweval(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data)
  */
 static void
 evaluate_kweval(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+                gmx_ana_index_t * /* g */, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_kweval *d = (t_methoddata_kweval *)data;
 
index b015667ebf133b911be0f35d96acafb8b601b719..45f191d9f6aeb11600a5edb7d6d327a7307bedcf 100644 (file)
@@ -45,6 +45,7 @@
 
 #include "gromacs/selection/position.h"
 #include "gromacs/selection/selmethod.h"
+#include "gromacs/utility/common.h"
 #include "gromacs/utility/exceptions.h"
 
 /*! \internal \brief
@@ -63,7 +64,15 @@ typedef struct
 /** Allocates data for the merging selection modifiers. */
 static void *
 init_data_merge(int npar, gmx_ana_selparam_t *param);
-/** Initializes data for the merging selection modifiers. */
+/*! \brief
+ * Initializes data for the merging selection modifiers.
+ *
+ * \param[in] top   Not used.
+ * \param[in] npar  Not used (should be 2 or 3).
+ * \param[in] param Method parameters (should point to \ref smparams_merge).
+ * \param[in] data  Should point to a \p t_methoddata_merge.
+ * \returns   0 if everything is successful, -1 on error.
+ */
 static void
 init_merge(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
 /** Initializes output for the \p merge selection modifier. */
@@ -75,14 +84,32 @@ init_output_plus(t_topology *top, gmx_ana_selvalue_t *out, void *data);
 /** Frees the memory allocated for the merging selection modifiers. */
 static void
 free_data_merge(void *data);
-/** Evaluates the \p merge selection modifier. */
+/*! \brief
+ * Evaluates the \p merge selection modifier.
+ *
+ * \param[in]  top   Not used.
+ * \param[in]  fr    Not used.
+ * \param[in]  pbc   Not used.
+ * \param[in]  p     Positions to merge (should point to \p data->p1).
+ * \param[out] out   Output data structure (\p out->u.p is used).
+ * \param[in]  data  Should point to a \p t_methoddata_merge.
+ */
 static void
 evaluate_merge(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-               gmx_ana_pos_t *p, gmx_ana_selvalue_t *out, void *data);
-/** Evaluates the \p plus selection modifier. */
+               gmx_ana_pos_t * p, gmx_ana_selvalue_t *out, void *data);
+/*! \brief
+ * Evaluates the \p plus selection modifier.
+ *
+ * \param[in]  top   Not used.
+ * \param[in]  fr    Not used.
+ * \param[in]  pbc   Not used.
+ * \param[in]  p     Positions to merge (should point to \p data->p1).
+ * \param[out] out   Output data structure (\p out->u.p is used).
+ * \param[in]  data  Should point to a \p t_methoddata_merge.
+ */
 static void
 evaluate_plus(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-              gmx_ana_pos_t *p, gmx_ana_selvalue_t *out, void *data);
+              gmx_ana_pos_t * p, gmx_ana_selvalue_t *out, void *data);
 
 /** Parameters for the merging selection modifiers. */
 static gmx_ana_selparam_t smparams_merge[] = {
@@ -169,15 +196,8 @@ init_data_merge(int npar, gmx_ana_selparam_t *param)
     return data;
 }
 
-/*!
- * \param[in] top   Not used.
- * \param[in] npar  Not used (should be 2 or 3).
- * \param[in] param Method parameters (should point to \ref smparams_merge).
- * \param[in] data  Should point to a \p t_methoddata_merge.
- * \returns   0 if everything is successful, -1 on error.
- */
 static void
-init_merge(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_merge(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t * /* param */, void *data)
 {
     t_methoddata_merge *d = (t_methoddata_merge *)data;
 
@@ -208,6 +228,7 @@ init_output_common(t_topology *top, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_merge *d = (t_methoddata_merge *)data;
 
+    GMX_UNUSED_VALUE(top);
     if (d->p1.m.type != d->p2.m.type)
     {
         /* TODO: Maybe we could pick something else here? */
@@ -279,17 +300,9 @@ free_data_merge(void *data)
     delete d;
 }
 
-/*!
- * \param[in]  top   Not used.
- * \param[in]  fr    Not used.
- * \param[in]  pbc   Not used.
- * \param[in]  p     Positions to merge (should point to \p data->p1).
- * \param[out] out   Output data structure (\p out->u.p is used).
- * \param[in]  data  Should point to a \p t_methoddata_merge.
- */
 static void
-evaluate_merge(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-               gmx_ana_pos_t *p, gmx_ana_selvalue_t *out, void *data)
+evaluate_merge(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
+               gmx_ana_pos_t * /* p */, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_merge *d = (t_methoddata_merge *)data;
     int                 i, j;
@@ -317,17 +330,9 @@ evaluate_merge(t_topology *top, t_trxframe *fr, t_pbc *pbc,
     gmx_ana_pos_append_finish(out->u.p);
 }
 
-/*!
- * \param[in]  top   Not used.
- * \param[in]  fr    Not used.
- * \param[in]  pbc   Not used.
- * \param[in]  p     Positions to merge (should point to \p data->p1).
- * \param[out] out   Output data structure (\p out->u.p is used).
- * \param[in]  data  Should point to a \p t_methoddata_merge.
- */
 static void
-evaluate_plus(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-              gmx_ana_pos_t *p, gmx_ana_selvalue_t *out, void *data)
+evaluate_plus(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
+              gmx_ana_pos_t * /* p */, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_merge *d = (t_methoddata_merge *)data;
     int                 i;
index 07ac04ae85448b9279c35366bf9a6bba937f57c9..d7b248d81c430477b8da9e642dcb8f14c6c26ed9 100644 (file)
@@ -63,20 +63,56 @@ typedef struct
     int             *rperm;
 } t_methoddata_permute;
 
-/** Allocates data for the \p permute selection modifier. */
+/*! \brief
+ * Allocates data for the \p permute selection modifier.
+ *
+ * \param[in]     npar  Not used (should be 2).
+ * \param[in,out] param Method parameters (should point to a copy of
+ *   \ref smparams_permute).
+ * \returns Pointer to the allocated data (\p t_methoddata_permute).
+ *
+ * Allocates memory for a \p t_methoddata_permute structure.
+ */
 static void *
 init_data_permute(int npar, gmx_ana_selparam_t *param);
-/** Initializes data for the \p permute selection modifier. */
+/*! \brief
+ * Initializes data for the \p permute selection modifier.
+ *
+ * \param[in] top   Not used.
+ * \param[in] npar  Not used (should be 2).
+ * \param[in] param Method parameters (should point to \ref smparams_permute).
+ * \param[in] data  Should point to a \p t_methoddata_permute.
+ * \returns   0 if the input permutation is valid, -1 on error.
+ */
 static void
 init_permute(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
-/** Initializes output for the \p permute selection modifier. */
+/*! \brief
+ * Initializes output for the \p permute selection modifier.
+ *
+ * \param[in]     top   Topology data structure.
+ * \param[in,out] out   Pointer to output data structure.
+ * \param[in,out] data  Should point to \c t_methoddata_permute.
+ */
 static void
 init_output_permute(t_topology *top, gmx_ana_selvalue_t *out, void *data);
 /** Frees the memory allocated for the \p permute selection modifier. */
 static void
 free_data_permute(void *data);
-/** Evaluates the \p permute selection modifier. */
 static void
+/*! \brief
+ * Evaluates the \p permute selection modifier.
+ *
+ * \param[in]  top   Not used.
+ * \param[in]  fr    Not used.
+ * \param[in]  pbc   Not used.
+ * \param[in]  p     Positions to permute (should point to \p data->p).
+ * \param[out] out   Output data structure (\p out->u.p is used).
+ * \param[in]  data  Should point to a \p t_methoddata_permute.
+ * \returns    0 if \p p could be permuted, -1 on error.
+ *
+ * Returns -1 if the size of \p p is not divisible by the number of
+ * elements in the permutation.
+ */
 evaluate_permute(t_topology *top, t_trxframe *fr, t_pbc *pbc,
                  gmx_ana_pos_t *p, gmx_ana_selvalue_t *out, void *data);
 
@@ -120,16 +156,8 @@ gmx_ana_selmethod_t sm_permute = {
     {"permute P1 ... PN", asize(help_permute), help_permute},
 };
 
-/*!
- * \param[in]     npar  Not used (should be 2).
- * \param[in,out] param Method parameters (should point to a copy of
- *   \ref smparams_permute).
- * \returns Pointer to the allocated data (\p t_methoddata_permute).
- *
- * Allocates memory for a \p t_methoddata_permute structure.
- */
 static void *
-init_data_permute(int npar, gmx_ana_selparam_t *param)
+init_data_permute(int /* npar */, gmx_ana_selparam_t *param)
 {
     t_methoddata_permute *data = new t_methoddata_permute();
     data->n          = 0;
@@ -139,15 +167,8 @@ init_data_permute(int npar, gmx_ana_selparam_t *param)
     return data;
 }
 
-/*!
- * \param[in] top   Not used.
- * \param[in] npar  Not used (should be 2).
- * \param[in] param Method parameters (should point to \ref smparams_permute).
- * \param[in] data  Should point to a \p t_methoddata_permute.
- * \returns   0 if the input permutation is valid, -1 on error.
- */
 static void
-init_permute(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_permute(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t *param, void *data)
 {
     t_methoddata_permute *d = (t_methoddata_permute *)data;
     int                   i;
@@ -179,13 +200,8 @@ init_permute(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
     }
 }
 
-/*!
- * \param[in]     top   Topology data structure.
- * \param[in,out] out   Pointer to output data structure.
- * \param[in,out] data  Should point to \c t_methoddata_permute.
- */
 static void
-init_output_permute(t_topology *top, gmx_ana_selvalue_t *out, void *data)
+init_output_permute(t_topology * /* top */, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_permute *d = (t_methoddata_permute *)data;
     int                   i, j, b;
@@ -218,20 +234,8 @@ free_data_permute(void *data)
     delete d;
 }
 
-/*!
- * \param[in]  top   Not used.
- * \param[in]  fr    Not used.
- * \param[in]  pbc   Not used.
- * \param[in]  p     Positions to permute (should point to \p data->p).
- * \param[out] out   Output data structure (\p out->u.p is used).
- * \param[in]  data  Should point to a \p t_methoddata_permute.
- * \returns    0 if \p p could be permuted, -1 on error.
- *
- * Returns -1 if the size of \p p is not divisible by the number of
- * elements in the permutation.
- */
 static void
-evaluate_permute(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_permute(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                  gmx_ana_pos_t *p, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_permute *d = (t_methoddata_permute *)data;
index 13f6b3be7652bfa8d10791cd5cc18cba8c7bce76..cc80f2a4e03194ab276a9805b69c6bc5355d59ba 100644 (file)
@@ -76,16 +76,49 @@ init_data_pos(int npar, gmx_ana_selparam_t *param);
 /** Sets the position calculation collection for position evaluation selection methods. */
 static void
 set_poscoll_pos(gmx::PositionCalculationCollection *pcc, void *data);
-/** Initializes position evaluation keywords. */
+/*! \brief
+ * Initializes position evaluation keywords.
+ *
+ * \param[in] top   Not used.
+ * \param[in] npar  Not used.
+ * \param[in] param Not used.
+ * \param[in,out] data  Should point to \c t_methoddata_pos.
+ * \returns       0 on success, a non-zero error code on error.
+ *
+ * The \c t_methoddata_pos::type field should have been initialized
+ * externally using _gmx_selelem_set_kwpos_type().
+ */
 static void
 init_kwpos(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
-/** Initializes the \p cog selection method. */
+/*! Initializes the \p cog selection method.
+ *
+ * \param[in]     top   Topology data structure.
+ * \param[in]     npar  Not used.
+ * \param[in]     param Not used.
+ * \param[in,out] data  Should point to \c t_methoddata_pos.
+ * \returns       0 on success, a non-zero error code on error.
+ */
 static void
 init_cog(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
-/** Initializes the \p cog selection method. */
+/*! \brief
+ * Initializes the \p cog selection method.
+ *
+ * \param[in]     top   Topology data structure.
+ * \param[in]     npar  Not used.
+ * \param[in]     param Not used.
+ * \param[in,out] data  Should point to \c t_methoddata_pos.
+ * \returns       0 on success, a non-zero error code on error.
+ */
 static void
 init_com(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
-/** Initializes output for position evaluation selection methods. */
+/*! \brief
+ * Initializes output for position evaluation selection methods.
+ *
+ * \param[in]     top   Topology data structure.
+ * \param[in,out] out   Pointer to output data structure.
+ * \param[in,out] data  Should point to \c t_methoddata_pos.
+ * \returns       0 for success.
+ */
 static void
 init_output_pos(t_topology *top, gmx_ana_selvalue_t *out, void *data);
 /** Frees the data allocated for position evaluation selection methods. */
@@ -93,8 +126,7 @@ static void
 free_data_pos(void *data);
 /** Evaluates position evaluation selection methods. */
 static void
-evaluate_pos(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-             gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data);
+evaluate_pos(t_topology * /* top */, t_trxframe *fr, t_pbc *pbc, gmx_ana_index_t * /* g */, gmx_ana_selvalue_t *out, void *data);
 
 /** Parameters for position keyword evaluation. */
 static gmx_ana_selparam_t smparams_keyword_pos[] = {
@@ -246,18 +278,8 @@ _gmx_selelem_set_kwpos_flags(gmx::SelectionTreeElement *sel, int flags)
     }
 }
 
-/*!
- * \param[in] top   Not used.
- * \param[in] npar  Not used.
- * \param[in] param Not used.
- * \param[in,out] data  Should point to \c t_methoddata_pos.
- * \returns       0 on success, a non-zero error code on error.
- *
- * The \c t_methoddata_pos::type field should have been initialized
- * externally using _gmx_selelem_set_kwpos_type().
- */
 static void
-init_kwpos(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_kwpos(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t *param, void *data)
 {
     t_methoddata_pos *d = (t_methoddata_pos *)data;
 
@@ -273,15 +295,8 @@ init_kwpos(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
     gmx_ana_poscalc_set_maxindex(d->pc, &d->g);
 }
 
-/*!
- * \param[in]     top   Topology data structure.
- * \param[in]     npar  Not used.
- * \param[in]     param Not used.
- * \param[in,out] data  Should point to \c t_methoddata_pos.
- * \returns       0 on success, a non-zero error code on error.
- */
 static void
-init_cog(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_cog(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t *param, void *data)
 {
     t_methoddata_pos *d = (t_methoddata_pos *)data;
 
@@ -290,15 +305,8 @@ init_cog(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
     gmx_ana_poscalc_set_maxindex(d->pc, &d->g);
 }
 
-/*!
- * \param[in]     top   Topology data structure.
- * \param[in]     npar  Not used.
- * \param[in]     param Not used.
- * \param[in,out] data  Should point to \c t_methoddata_pos.
- * \returns       0 on success, a non-zero error code on error.
- */
 static void
-init_com(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_com(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t *param, void *data)
 {
     t_methoddata_pos *d = (t_methoddata_pos *)data;
 
@@ -308,14 +316,8 @@ init_com(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
     gmx_ana_poscalc_set_maxindex(d->pc, &d->g);
 }
 
-/*!
- * \param[in]     top   Topology data structure.
- * \param[in,out] out   Pointer to output data structure.
- * \param[in,out] data  Should point to \c t_methoddata_pos.
- * \returns       0 for success.
- */
 static void
-init_output_pos(t_topology *top, gmx_ana_selvalue_t *out, void *data)
+init_output_pos(t_topology * /* top */, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_pos *d = (t_methoddata_pos *)data;
 
@@ -346,8 +348,8 @@ free_data_pos(void *data)
  * in \c t_methoddata_pos::g and stores the results in \p out->u.p.
  */
 static void
-evaluate_pos(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-             gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_pos(t_topology * /* top */, t_trxframe *fr, t_pbc *pbc,
+             gmx_ana_index_t * /* g */, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_pos *d = (t_methoddata_pos *)data;
 
index 070c999fcede5a83007c0380763ec368dd594c32..ae842a53515dbfc296179881ce7f3b4d8ae18b68 100644 (file)
@@ -97,28 +97,63 @@ typedef struct
     bool                     bSorted;
 } t_methoddata_same;
 
-/** Allocates data for the \p same selection method. */
+/*! \brief
+ * Allocates data for the \p same selection method.
+ *
+ * \param[in]     npar  Not used (should be 2).
+ * \param[in,out] param Method parameters (should point to a copy of
+ *      ::smparams_same_int or ::smparams_same_str).
+ * \returns Pointer to the allocated data (\ref t_methoddata_same).
+ */
 static void *
 init_data_same(int npar, gmx_ana_selparam_t *param);
-/** Initializes the \p same selection method. */
+/*! Initializes the \p same selection method.
+ *
+ * \param   top   Not used.
+ * \param   npar  Not used (should be 2).
+ * \param   param Initialized method parameters (should point to a copy of
+ *      ::smparams_same_int or ::smparams_same_str).
+ * \param   data  Pointer to \ref t_methoddata_same to initialize.
+ * \returns 0 on success, -1 on failure.
+ */
 static void
 init_same(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
 /** Frees the data allocated for the \p same selection method. */
 static void
 free_data_same(void *data);
-/** Initializes the evaluation of the \p same selection method for a frame. */
+/*! \brief
+ * Initializes the evaluation of the \p same selection method for a frame.
+ *
+ * \param[in]  top  Not used.
+ * \param[in]  fr   Current frame.
+ * \param[in]  pbc  PBC structure.
+ * \param      data Should point to a \ref t_methoddata_same.
+ *
+ * Sorts the \c data->as.i array and removes identical values for faster and
+ * simpler lookup.
+ */
 static void
 init_frame_same_int(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data);
 /** Evaluates the \p same selection method. */
 static void
-evaluate_same_int(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_same_int(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                   gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data);
-/** Initializes the evaluation of the \p same selection method for a frame. */
+/*! \brief
+ * Initializes the evaluation of the \p same selection method for a frame.
+ *
+ * \param[in]  top  Not used.
+ * \param[in]  fr   Current frame.
+ * \param[in]  pbc  PBC structure.
+ * \param      data Should point to a \ref t_methoddata_same.
+ *
+ * Sorts the \c data->as.s array and removes identical values for faster and
+ * simpler lookup.
+ */
 static void
 init_frame_same_str(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data);
 /** Evaluates the \p same selection method. */
 static void
-evaluate_same_str(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_same_str(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                   gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data);
 
 /** Parameters for the \p same selection method. */
@@ -180,14 +215,8 @@ static gmx_ana_selmethod_t sm_same_str = {
     {"same KEYWORD as ATOM_EXPR", asize(help_same), help_same},
 };
 
-/*!
- * \param[in]     npar  Not used (should be 2).
- * \param[in,out] param Method parameters (should point to a copy of
- *      ::smparams_same_int or ::smparams_same_str).
- * \returns Pointer to the allocated data (\ref t_methoddata_same).
- */
 static void *
-init_data_same(int npar, gmx_ana_selparam_t *param)
+init_data_same(int /* npar */, gmx_ana_selparam_t *param)
 {
     t_methoddata_same *data;
 
@@ -258,16 +287,8 @@ _gmx_selelem_custom_init_same(gmx_ana_selmethod_t                           **me
     return 0;
 }
 
-/*!
- * \param   top   Not used.
- * \param   npar  Not used (should be 2).
- * \param   param Initialized method parameters (should point to a copy of
- *      ::smparams_same_int or ::smparams_same_str).
- * \param   data  Pointer to \ref t_methoddata_same to initialize.
- * \returns 0 on success, -1 on failure.
- */
 static void
-init_same(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+init_same(t_topology * /* top */, int /* npar */, gmx_ana_selparam_t *param, void *data)
 {
     t_methoddata_same *d = (t_methoddata_same *)data;
 
@@ -314,17 +335,8 @@ cmp_int(const void *a, const void *b)
     return 0;
 }
 
-/*!
- * \param[in]  top  Not used.
- * \param[in]  fr   Current frame.
- * \param[in]  pbc  PBC structure.
- * \param      data Should point to a \ref t_methoddata_same.
- *
- * Sorts the \c data->as.i array and removes identical values for faster and
- * simpler lookup.
- */
 static void
-init_frame_same_int(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data)
+init_frame_same_int(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */, void *data)
 {
     t_methoddata_same *d = (t_methoddata_same *)data;
     int                i, j;
@@ -372,7 +384,7 @@ init_frame_same_int(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data)
  * \c data->val.
  */
 static void
-evaluate_same_int(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_same_int(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                   gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_same     *d = (t_methoddata_same *)data;
@@ -447,17 +459,8 @@ cmp_str(const void *a, const void *b)
     return strcmp(*(char **)a, *(char **)b);
 }
 
-/*!
- * \param[in]  top  Not used.
- * \param[in]  fr   Current frame.
- * \param[in]  pbc  PBC structure.
- * \param      data Should point to a \ref t_methoddata_same.
- *
- * Sorts the \c data->as.s array and removes identical values for faster and
- * simpler lookup.
- */
 static void
-init_frame_same_str(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data)
+init_frame_same_str(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */, void *data)
 {
     t_methoddata_same *d = (t_methoddata_same *)data;
     int                i, j;
@@ -500,7 +503,7 @@ init_frame_same_str(t_topology *top, t_trxframe *fr, t_pbc *pbc, void *data)
  * \c data->val.
  */
 static void
-evaluate_same_str(t_topology *top, t_trxframe *fr, t_pbc *pbc,
+evaluate_same_str(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
                   gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
 {
     t_methoddata_same     *d = (t_methoddata_same *)data;
index c14c357f6610ff0a00c5feaf1451e644f9f013b7..bf4463731f77d04804218bd4551b3b11de71b611 100644 (file)
@@ -67,7 +67,17 @@ evaluate_resnr(t_topology *top, t_trxframe *fr, t_pbc *pbc,
 static void
 evaluate_resindex(t_topology *top, t_trxframe *fr, t_pbc *pbc,
                   gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data);
-/** Checks whether molecule information is present in the topology. */
+/*! \brief
+ * Checks whether molecule information is present in the topology.
+ *
+ * \param[in] top  Topology structure.
+ * \param     npar Not used.
+ * \param     param Not used.
+ * \param     data Not used.
+ * \returns   0 if molecule info is present in the topology, -1 otherwise.
+ *
+ * If molecule information is not found, also prints an error message.
+ */
 static void
 check_molecules(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
 /** Evaluates the \p molindex selection keyword. */
@@ -82,7 +92,17 @@ evaluate_atomname(t_topology *top, t_trxframe *fr, t_pbc *pbc,
 static void
 evaluate_pdbatomname(t_topology *top, t_trxframe *fr, t_pbc *pbc,
                      gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data);
-/** Checks whether atom types are present in the topology. */
+/*! \brief
+ * Checks whether atom types are present in the topology.
+ *
+ * \param[in] top  Topology structure.
+ * \param     npar Not used.
+ * \param     param Not used.
+ * \param     data Not used.
+ * \returns   0 if atom types are present in the topology, -1 otherwise.
+ *
+ * If the atom types are not found, also prints an error message.
+ */
 static void
 check_atomtype(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
 /** Evaluates the \p atomtype selection keyword. */
@@ -105,7 +125,17 @@ evaluate_mass(t_topology *top, t_trxframe *fr, t_pbc *pbc,
 static void
 evaluate_charge(t_topology *top, t_trxframe *fr, t_pbc *pbc,
                 gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data);
-/** Checks whether PDB info is present in the topology. */
+/*! \brief
+ * Checks whether PDB info is present in the topology.
+ *
+ * \param[in] top  Topology structure.
+ * \param     npar Not used.
+ * \param     param Not used.
+ * \param     data Not used.
+ * \returns   0 if PDB info is present in the topology, -1 otherwise.
+ *
+ * If PDB info is not found, also prints an error message.
+ */
 static void
 check_pdbinfo(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data);
 /** Evaluates the \p altloc selection keyword. */
@@ -447,8 +477,8 @@ gmx_ana_selmethod_t sm_z = {
  * Copies \p g to \p out->u.g.
  */
 static void
-evaluate_all(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-             gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_all(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
+             gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     gmx_ana_index_copy(out->u.g, g, false);
 }
@@ -460,8 +490,8 @@ evaluate_all(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * Returns an empty \p out->u.g.
  */
 static void
-evaluate_none(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-              gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_none(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
+              gmx_ana_index_t * /* g */, gmx_ana_selvalue_t *out, void * /* data */)
 {
     out->u.g->isize = 0;
 }
@@ -473,8 +503,8 @@ evaluate_none(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * Returns the indices for each atom in \p out->u.i.
  */
 static void
-evaluate_atomnr(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_atomnr(t_topology * /* top */, t_trxframe * /* fr */, t_pbc * /* pbc */,
+                gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
 
@@ -492,8 +522,8 @@ evaluate_atomnr(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * Returns the residue numbers for each atom in \p out->u.i.
  */
 static void
-evaluate_resnr(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-               gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_resnr(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+               gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
     int  resind;
@@ -513,8 +543,8 @@ evaluate_resnr(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * Returns the residue indices for each atom in \p out->u.i.
  */
 static void
-evaluate_resindex(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                  gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_resindex(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+                  gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
 
@@ -525,17 +555,8 @@ evaluate_resindex(t_topology *top, t_trxframe *fr, t_pbc *pbc,
     }
 }
 
-/*!
- * \param[in] top  Topology structure.
- * \param     npar Not used.
- * \param     param Not used.
- * \param     data Not used.
- * \returns   0 if molecule info is present in the topology, -1 otherwise.
- *
- * If molecule information is not found, also prints an error message.
- */
 static void
-check_molecules(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+check_molecules(t_topology *top, int /* npar */, gmx_ana_selparam_t * /* param */, void * /* data */)
 {
     bool bOk;
 
@@ -553,8 +574,8 @@ check_molecules(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data
  * Returns the molecule indices for each atom in \p out->u.i.
  */
 static void
-evaluate_molindex(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                  gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_molindex(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+                  gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i, j;
 
@@ -576,8 +597,8 @@ evaluate_molindex(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * Returns the atom name for each atom in \p out->u.s.
  */
 static void
-evaluate_atomname(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                  gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_atomname(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+                  gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
 
@@ -595,8 +616,8 @@ evaluate_atomname(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * Returns the PDB atom name for each atom in \p out->u.s.
  */
 static void
-evaluate_pdbatomname(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                     gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_pdbatomname(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+                     gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
 
@@ -612,17 +633,8 @@ evaluate_pdbatomname(t_topology *top, t_trxframe *fr, t_pbc *pbc,
     }
 }
 
-/*!
- * \param[in] top  Topology structure.
- * \param     npar Not used.
- * \param     param Not used.
- * \param     data Not used.
- * \returns   0 if atom types are present in the topology, -1 otherwise.
- *
- * If the atom types are not found, also prints an error message.
- */
 static void
-check_atomtype(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+check_atomtype(t_topology *top, int /* npar */, gmx_ana_selparam_t * /* param */, void * /* data */)
 {
     bool bOk;
 
@@ -641,8 +653,8 @@ check_atomtype(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
  * Segfaults if atom types are not found in the topology.
  */
 static void
-evaluate_atomtype(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                  gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_atomtype(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+                  gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
 
@@ -660,8 +672,8 @@ evaluate_atomtype(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * Returns the residue name for each atom in \p out->u.s.
  */
 static void
-evaluate_resname(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                 gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_resname(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+                 gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
     int  resind;
@@ -681,8 +693,8 @@ evaluate_resname(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * Returns the insertion code for each atom in \p out->u.s.
  */
 static void
-evaluate_insertcode(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                    gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_insertcode(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+                    gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
     int  resind;
@@ -702,8 +714,8 @@ evaluate_insertcode(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * Returns the chain for each atom in \p out->u.s.
  */
 static void
-evaluate_chain(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-               gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_chain(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+               gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
     int  resind;
@@ -723,8 +735,8 @@ evaluate_chain(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * Returns the mass for each atom in \p out->u.r.
  */
 static void
-evaluate_mass(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-              gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_mass(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+              gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
 
@@ -742,8 +754,8 @@ evaluate_mass(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * Returns the charge for each atom in \p out->u.r.
  */
 static void
-evaluate_charge(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_charge(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+                gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
 
@@ -754,17 +766,8 @@ evaluate_charge(t_topology *top, t_trxframe *fr, t_pbc *pbc,
     }
 }
 
-/*!
- * \param[in] top  Topology structure.
- * \param     npar Not used.
- * \param     param Not used.
- * \param     data Not used.
- * \returns   0 if PDB info is present in the topology, -1 otherwise.
- *
- * If PDB info is not found, also prints an error message.
- */
 static void
-check_pdbinfo(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
+check_pdbinfo(t_topology *top, int /* npar */, gmx_ana_selparam_t * /* param */, void * /* data */)
 {
     bool bOk;
 
@@ -782,8 +785,8 @@ check_pdbinfo(t_topology *top, int npar, gmx_ana_selparam_t *param, void *data)
  * Returns the alternate location identifier for each atom in \p out->u.s.
  */
 static void
-evaluate_altloc(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_altloc(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+                gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
 
@@ -802,8 +805,8 @@ evaluate_altloc(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * Segfaults if PDB info is not found in the topology.
  */
 static void
-evaluate_occupancy(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                   gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_occupancy(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+                   gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
 
@@ -822,8 +825,8 @@ evaluate_occupancy(t_topology *top, t_trxframe *fr, t_pbc *pbc,
  * Segfaults if PDB info is not found in the topology.
  */
 static void
-evaluate_betafactor(t_topology *top, t_trxframe *fr, t_pbc *pbc,
-                    gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void *data)
+evaluate_betafactor(t_topology *top, t_trxframe * /* fr */, t_pbc * /* pbc */,
+                    gmx_ana_index_t *g, gmx_ana_selvalue_t *out, void * /* data */)
 {
     int  i;
 
index 667b2a450040af66d240168db03f821a7a540fcc..ddc6edb4b52054e5553fee85c877caaa47e83acc 100644 (file)
@@ -167,7 +167,7 @@ TrajectoryAnalysisCommandLineRunner::~TrajectoryAnalysisCommandLineRunner()
 void
 TrajectoryAnalysisCommandLineRunner::setSelectionDebugLevel(int debuglevel)
 {
-    impl_->debugLevel_ = 1;
+    impl_->debugLevel_ = debuglevel;
 }
 
 
index 2a25d0ce1be48b7c4b3b6e5d1cbc91a4573a51ba..3bde55ee2c37f9e7057f26b48f2f19f3b573ee76 100644 (file)
@@ -154,6 +154,8 @@ class TrajectoryAnalysisCommandLineRunner
          *
          * This is intended only for use by internal debugging tools.
          *
+         * \param[in] debuglevel  Level of debugging verbosity.
+         *
          * Does not throw.
          *
          * \see SelectionCollection::setDebugLevel()
index 44a68ccb825c60839baade73efc4a1632e19d50c..82df22f1c83795684011432536c502cdd2b1f659 100644 (file)
@@ -224,7 +224,7 @@ Angle::initOptions(Options *options, TrajectoryAnalysisSettings * /*settings*/)
 
 
 void
-Angle::optionsFinished(Options *options, TrajectoryAnalysisSettings *settings)
+Angle::optionsFinished(Options *options, TrajectoryAnalysisSettings * /* settings */)
 {
     bool bSingle = (g1type_[0] == 'a' || g1type_[0] == 'd');
 
@@ -338,7 +338,7 @@ Angle::checkSelections(const SelectionList &sel1,
 
 void
 Angle::initAnalysis(const TrajectoryAnalysisSettings &settings,
-                    const TopologyInformation        &top)
+                    const TopologyInformation         & /* top */)
 {
     checkSelections(sel1_, sel2_);
 
index 7882e14ceb35910d934984a55f619b195929159b..ab16c37b5655d20f9c7f3cbeb7b52f11c618a0b2 100644 (file)
@@ -395,7 +395,7 @@ FreeVolume::analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
 
 
 void
-FreeVolume::finishAnalysis(int nframes)
+FreeVolume::finishAnalysis(int /* nframes */)
 {
     please_cite(stdout, "Bondi1964a");
     please_cite(stdout, "Lourenco2013a");
index 8fafa9df0d433ff6d5536808a3903181c936f0d9..e95229a9b154434692879091fcbd6f83dca85f88 100644 (file)
@@ -568,7 +568,7 @@ Select::initAnalysis(const TrajectoryAnalysisSettings &settings,
 
 
 void
-Select::analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
+Select::analyzeFrame(int frnr, const t_trxframe &fr, t_pbc * /* pbc */,
                      TrajectoryAnalysisModuleData *pdata)
 {
     AnalysisDataHandle   sdh = pdata->dataHandle(sdata_);
index 45b644434490448d258c76f30b488b33e414049e..f54654681d16f24aa4d0c0e95ea951011b55fd80 100644 (file)
@@ -102,6 +102,12 @@ void inline ignoreValueHelper(const T &)
  */
 #define GMX_IGNORE_RETURN_VALUE(call) \
         ::gmx::internal::ignoreValueHelper(call)
+/*! \brief
+ * Macro to explicitly ignore an unused value.
+ *
+ * \ingroup module_utility
+ */
+#define GMX_UNUSED_VALUE(value) (void)value
 
 /*! \brief
  * Helper class to manage a pointer to a private implementation class.
index ea3db03ed221459724eaf02a0c0d13dfe1067fd9..da2317cfc485dd39783185aaf379826b56225418 100644 (file)
@@ -95,7 +95,7 @@ class AnalysisDataTestInputPointSet
         //! Returns the error in column \p i.
         real error(int i) const { return values_[i].error; }
         //! Returns whether the value in column \p i is present.
-        bool present(int i) const { return true; }
+        bool present(int /*i*/) const { return true; }
         //! Returns an AnalysisDataValue for column \p i.
         AnalysisDataValue value(int i) const
         {
index f1ff4bb1d6cfb106f82e932dd3623ad5e4df5646..0f7697fa358027044963e17a12d4c0ebc07f9897 100644 (file)
@@ -574,7 +574,7 @@ MockAnalysisDataModule::setupStaticCheck(const AnalysisDataTestInput &data,
 void
 MockAnalysisDataModule::setupStaticColumnCheck(
         const AnalysisDataTestInput &data,
-        int firstcol, int n, AbstractAnalysisData *source)
+        int firstcol, int n, AbstractAnalysisData * /*source*/)
 {
     impl_->flags_ |= efAllowMulticolumn | efAllowMultipoint | efAllowMultipleDataSets;