programs: clean up -Wunused-parameter warnings
authorAlexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
Thu, 25 Jul 2013 23:31:25 +0000 (03:31 +0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 26 Sep 2013 14:34:27 +0000 (16:34 +0200)
Clean up rest of warnings in programs

Change-Id: Ieed9d732e893eb5cfb14af9d8367bae7c7976f13
Signed-off-by: Alexey Shvetsov <alexxy@omrb.pnpi.spb.ru>
src/programs/gmx/grompp.c
src/programs/gmx/pdb2gmx.c
src/programs/gmx/tpbcmp.c
src/programs/gmx/tpbconv.c
src/programs/mdrun/membed.c
src/programs/mdrun/repl_ex.c

index 2d94df9f7efc411ecbd07edf21827d4d1dca2e89..08fad6194519baaf9019817b805638ed358e730e 100644 (file)
@@ -1216,7 +1216,7 @@ static void check_gbsa_params_charged(gmx_mtop_t *sys, gpp_atomtype_t atype)
 }
 
 
-static void check_gbsa_params(t_inputrec *ir, gpp_atomtype_t atype)
+static void check_gbsa_params(gpp_atomtype_t atype)
 {
     int  nmiss, i;
 
@@ -1685,7 +1685,7 @@ int gmx_grompp(int argc, char *argv[])
     if (ir->implicit_solvent != eisNO)
     {
         /* Now we have renumbered the atom types, we can check the GBSA params */
-        check_gbsa_params(ir, atype);
+        check_gbsa_params(atype);
 
         /* Check that all atoms that have charge and/or LJ-parameters also have
          * sensible GB-parameters
index 7156ba6eba9347876f2d02de64c72c7501ab5d04..4f4545f6af31cd807c2e2f0657cf59a59746d204 100644 (file)
@@ -675,7 +675,7 @@ int pdbicomp(const void *a, const void *b)
     return d;
 }
 
-static void sort_pdbatoms(int nrtp, t_restp restp[], t_hackblock hb[],
+static void sort_pdbatoms(t_restp restp[],
                           int natoms, t_atoms **pdbaptr, rvec **x,
                           t_blocka *block, char ***gnames)
 {
@@ -1932,8 +1932,7 @@ int gmx_pdb2gmx(int argc, char *argv[])
         {
             block = new_blocka();
             snew(gnames, 1);
-            sort_pdbatoms(pdba->nres, restp_chain, hb_chain,
-                          natom, &pdba, &x, block, &gnames);
+            sort_pdbatoms(restp_chain, natom, &pdba, &x, block, &gnames);
             natom = remove_duplicate_atoms(pdba, x, bVerbose);
             if (ftp2bSet(efNDX, NFILE, fnm))
             {
index e6ac510d2da1a85065d4aa39544ce7ddcfaadff9..fd03f9ac11d3754337b800ed545dc3ef5c017de6 100644 (file)
@@ -650,7 +650,7 @@ static void cmp_adress(FILE *fp, t_adress *ad1, t_adress *ad2,
     cmp_real(fp, "ir->adress->ex_forcecap", -1, ad1->ex_forcecap, ad2->ex_forcecap, ftol, abstol);
 }
 
-static void cmp_pull(FILE *fp, t_pull *pull1, t_pull *pull2, real ftol, real abstol)
+static void cmp_pull(FILE *fp)
 {
     fprintf(fp, "WARNING: Both files use COM pulling, but comparing of the pull struct is not implemented (yet). The pull parameters could be the same or different.\n");
 }
@@ -843,7 +843,7 @@ static void cmp_inputrec(FILE *fp, t_inputrec *ir1, t_inputrec *ir2, real ftol,
     cmp_int(fp, "inputrec->ePull", -1, ir1->ePull, ir2->ePull);
     if (ir1->ePull == ir2->ePull && ir1->ePull != epullNO)
     {
-        cmp_pull(fp, ir1->pull, ir2->pull, ftol, abstol);
+        cmp_pull(fp);
     }
 
     cmp_int(fp, "inputrec->eDisre", -1, ir1->eDisre, ir2->eDisre);
@@ -1189,7 +1189,7 @@ static gmx_bool enernm_equal(const char *nm1, const char *nm2)
 
 static void cmp_energies(FILE *fp, int step1, int step2,
                          t_energy e1[], t_energy e2[],
-                         gmx_enxnm_t *enm1, gmx_enxnm_t *enm2,
+                         gmx_enxnm_t *enm1,
                          real ftol, real abstol,
                          int nre, int *ind1, int *ind2, int maxener)
 {
@@ -1470,7 +1470,7 @@ void comp_enx(const char *fn1, const char *fn2, real ftol, real abstol, const ch
             if ((fr1->nre >= nre) && (fr2->nre >= nre))
             {
                 cmp_energies(stdout, fr1->step, fr1->step, fr1->ener, fr2->ener,
-                             enm1, enm2, ftol, abstol, nre, ind1, ind2, maxener);
+                             enm1, ftol, abstol, nre, ind1, ind2, maxener);
             }
             /*cmp_disres(fr1,fr2,ftol,abstol);*/
             cmp_eblocks(fr1, fr2, ftol, abstol);
index eacb531ff3fe2e0358ee97b1c32e1805b8da2fc5..f07eba136703e57b7609e76594a7c8967abf7db7 100644 (file)
@@ -306,7 +306,7 @@ static void reduce_topology_x(int gnx, atom_id index[],
     mtop->natoms                 = top.atoms.nr;
 }
 
-static void zeroq(int n, atom_id index[], gmx_mtop_t *mtop)
+static void zeroq(atom_id index[], gmx_mtop_t *mtop)
 {
     int mt, i;
 
@@ -669,7 +669,7 @@ int gmx_tpbconv(int argc, char *argv[])
             }
             else if (bZeroQ)
             {
-                zeroq(gnx, index, &mtop);
+                zeroq(index, &mtop);
                 fprintf(stderr, "Zero-ing charges for group %s\n", grpname);
             }
             else
index 52ce5b8b8b807031c1f59139cc86714150b5cbe0..a9468e8a9e6539d54c50c40d31378c88569b8934 100644 (file)
@@ -534,7 +534,7 @@ static void resize(rvec *r_ins, rvec *r, pos_ins_t *pos_ins, rvec fac)
 /* generate the list of membrane molecules that overlap with the molecule to be embedded. *
  * The molecule to be embedded is already reduced in size. */
 static int gen_rm_list(rm_t *rm_p, t_block *ins_at, t_block *rest_at, t_pbc *pbc, gmx_mtop_t *mtop,
-                       rvec *r, rvec *r_ins, mem_t *mem_p, pos_ins_t *pos_ins, real probe_rad,
+                       rvec *r, mem_t *mem_p, pos_ins_t *pos_ins, real probe_rad,
                        int low_up_rm, gmx_bool bALLOW_ASYMMETRY)
 {
     int      i, j, k, l, at, at2, mol_id;
@@ -690,7 +690,7 @@ static int gen_rm_list(rm_t *rm_p, t_block *ins_at, t_block *rest_at, t_pbc *pbc
 }
 
 /*remove all lipids and waters overlapping and update all important structures (e.g. state and mtop)*/
-static void rm_group(t_inputrec *ir, gmx_groups_t *groups, gmx_mtop_t *mtop, rm_t *rm_p, t_state *state,
+static void rm_group(gmx_groups_t *groups, gmx_mtop_t *mtop, rm_t *rm_p, t_state *state,
                      t_block *ins_at, pos_ins_t *pos_ins)
 {
     int             i, j, k, n, rm, mol_id, at, block;
@@ -888,7 +888,7 @@ int rm_bonded(t_block *ins_at, gmx_mtop_t *mtop)
 }
 
 /* Write a topology where the number of molecules is correct for the system after embedding */
-static void top_update(const char *topfile, char *ins, rm_t *rm_p, gmx_mtop_t *mtop)
+static void top_update(const char *topfile, rm_t *rm_p, gmx_mtop_t *mtop)
 {
 #define TEMP_FILENM "temp.top"
     int        bMolecules = 0;
@@ -1241,7 +1241,7 @@ gmx_membed_t init_membed(FILE *fplog, int nfile, const t_filenm fnm[], gmx_mtop_
         set_pbc(pbc, inputrec->ePBC, state->box);
 
         snew(rm_p, 1);
-        lip_rm = gen_rm_list(rm_p, ins_at, rest_at, pbc, mtop, state->x, r_ins, mem_p, pos_ins,
+        lip_rm = gen_rm_list(rm_p, ins_at, rest_at, pbc, mtop, state->x, mem_p, pos_ins,
                              probe_rad, low_up_rm, bALLOW_ASYMMETRY);
         lip_rm -= low_up_rm;
 
@@ -1275,7 +1275,7 @@ gmx_membed_t init_membed(FILE *fplog, int nfile, const t_filenm fnm[], gmx_mtop_
         }
 
         /*remove all lipids and waters overlapping and update all important structures*/
-        rm_group(inputrec, groups, mtop, rm_p, state, ins_at, pos_ins);
+        rm_group(groups, mtop, rm_p, state, ins_at, pos_ins);
 
         rm_bonded_at = rm_bonded(ins_at, mtop);
         if (rm_bonded_at != ins_at->nr)
@@ -1293,7 +1293,7 @@ gmx_membed_t init_membed(FILE *fplog, int nfile, const t_filenm fnm[], gmx_mtop_
 
         if (ftp2bSet(efTOP, nfile, fnm))
         {
-            top_update(opt2fn("-mp", nfile, fnm), ins, rm_p, mtop);
+            top_update(opt2fn("-mp", nfile, fnm), rm_p, mtop);
         }
 
         sfree(pbc);
index 474e0509cb725a49c3404427e3788b79d508fa07..8501a9667696ab0b586cbe48ff48191614ed5dba 100644 (file)
@@ -100,7 +100,7 @@ typedef struct gmx_repl_ex
 
 } t_gmx_repl_ex;
 
-static gmx_bool repl_quantity(FILE *fplog, const gmx_multisim_t *ms,
+static gmx_bool repl_quantity(const gmx_multisim_t *ms,
                               struct gmx_repl_ex *re, int ere, real q)
 {
     real    *qall;
@@ -185,10 +185,10 @@ gmx_repl_ex_t init_replica_exchange(FILE *fplog,
     }
 
     re->type = -1;
-    bTemp    = repl_quantity(fplog, ms, re, ereTEMP, re->temp);
+    bTemp    = repl_quantity(ms, re, ereTEMP, re->temp);
     if (ir->efep != efepNO)
     {
-        bLambda = repl_quantity(fplog, ms, re, ereLAMBDA, (real)ir->fepvals->init_fep_state);
+        bLambda = repl_quantity(ms, re, ereLAMBDA, (real)ir->fepvals->init_fep_state);
     }
     if (re->type == -1)  /* nothing was assigned */
     {
@@ -664,7 +664,7 @@ static void pd_collect_state(const t_commrec *cr, t_state *state)
     }
 }
 
-static void print_transition_matrix(FILE *fplog, const char *leg, int n, int **nmoves, int *nattempt)
+static void print_transition_matrix(FILE *fplog, int n, int **nmoves, int *nattempt)
 {
     int   i, j, ntot;
     float Tprint;
@@ -713,7 +713,7 @@ static void print_ind(FILE *fplog, const char *leg, int n, int *ind, gmx_bool *b
     fprintf(fplog, "\n");
 }
 
-static void print_allswitchind(FILE *fplog, int n, int *ind, int *pind, int *allswaps, int *tmpswap)
+static void print_allswitchind(FILE *fplog, int n, int *pind, int *allswaps, int *tmpswap)
 {
     int i;
 
@@ -1039,7 +1039,7 @@ test_for_replica_exchange(FILE                 *fplog,
             }
         }
         re->nattempt[0]++;  /* keep track of total permutation trials here */
-        print_allswitchind(fplog, re->nrepl, re->ind, pind, re->allswaps, re->tmpswap);
+        print_allswitchind(fplog, re->nrepl, pind, re->allswaps, re->tmpswap);
     }
     else
     {
@@ -1120,8 +1120,7 @@ static void write_debug_x(t_state *state)
 }
 
 static void
-cyclic_decomposition(FILE      *fplog,
-                     const int *destinations,
+cyclic_decomposition(const int *destinations,
                      int      **cyclic,
                      gmx_bool  *incycle,
                      const int  nrepl,
@@ -1274,7 +1273,7 @@ prepare_to_do_exchange(FILE      *fplog,
 
         /* Identify the cyclic decomposition of the permutation (very
          * fast if neighbor replica exchange). */
-        cyclic_decomposition(fplog, destinations, cyclic, incycle, nrepl, maxswap);
+        cyclic_decomposition(destinations, cyclic, incycle, nrepl, maxswap);
 
         /* Now translate the decomposition into a replica exchange
          * order at each step. */
@@ -1435,5 +1434,5 @@ void print_replica_exchange_statistics(FILE *fplog, struct gmx_repl_ex *re)
         fprintf(fplog, "\n");
     }
     /* print the transition matrix */
-    print_transition_matrix(fplog, "", re->nrepl, re->nmoves, re->nattempt);
+    print_transition_matrix(fplog, re->nrepl, re->nmoves, re->nattempt);
 }