more cosmetic changes to silence pedantic warnings

This commit is contained in:
Axel Kohlmeyer 2018-05-04 22:26:53 -04:00
parent 53342a5cec
commit b7210e931c
4 changed files with 7 additions and 8 deletions

View File

@ -303,7 +303,7 @@ void NEB::run()
update->minimize->setup(); update->minimize->setup();
if (me_universe == 0) { if (me_universe == 0) {
if (uscreen) if (uscreen) {
if (verbose) { if (verbose) {
fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce "
"GradV0 GradV1 GradVc EBF EBR RDT " "GradV0 GradV1 GradVc EBF EBR RDT "
@ -317,7 +317,8 @@ void NEB::run()
"EBF EBR RDT " "EBF EBR RDT "
"RD1 PE1 RD2 PE2 ... RDN PEN\n"); "RD1 PE1 RD2 PE2 ... RDN PEN\n");
} }
if (ulogfile) }
if (ulogfile) {
if (verbose) { if (verbose) {
fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce "
"GradV0 GradV1 GradVc EBF EBR RDT " "GradV0 GradV1 GradVc EBF EBR RDT "
@ -331,6 +332,7 @@ void NEB::run()
"EBF EBR RDT " "EBF EBR RDT "
"RD1 PE1 RD2 PE2 ... RDN PEN\n"); "RD1 PE1 RD2 PE2 ... RDN PEN\n");
} }
}
} }
print_status(); print_status();

View File

@ -2342,7 +2342,7 @@ void FixRigid::write_restart_file(char *file)
sprintf(outfile,"%s.rigid",file); sprintf(outfile,"%s.rigid",file);
FILE *fp = fopen(outfile,"w"); FILE *fp = fopen(outfile,"w");
if (fp == NULL) { if (fp == NULL) {
char str[128]; char str[192];
sprintf(str,"Cannot open fix rigid restart file %s",outfile); sprintf(str,"Cannot open fix rigid restart file %s",outfile);
error->one(FLERR,str); error->one(FLERR,str);
} }

View File

@ -539,7 +539,7 @@ double PairLJSFDipoleSF::single(int i, int j, int itype, int jtype, double rsq,
double &fforce) double &fforce)
{ {
double r2inv,r6inv; double r2inv,r6inv;
double pdotp,pidotr,pjdotr,pre1,delx,dely,delz; double pdotp,pidotr,pjdotr,delx,dely,delz;
double rinv, r3inv,r5inv, rcutlj2inv, rcutcoul2inv,rcutlj6inv; double rinv, r3inv,r5inv, rcutlj2inv, rcutcoul2inv,rcutlj6inv;
double qtmp,xtmp,ytmp,ztmp,bfac,pqfac,qpfac, ecoul, evdwl; double qtmp,xtmp,ytmp,ztmp,bfac,pqfac,qpfac, ecoul, evdwl;

View File

@ -933,7 +933,7 @@ void lammps_gather_atoms_concat(void *ptr, char *name,
BEGIN_CAPTURE BEGIN_CAPTURE
{ {
int i,j,offset; int i,offset;
// error if tags are not defined // error if tags are not defined
// NOTE: test that name = image or ids is not a 64-bit int in code? // NOTE: test that name = image or ids is not a 64-bit int in code?
@ -975,7 +975,6 @@ void lammps_gather_atoms_concat(void *ptr, char *name,
lmp->memory->create(copy,count*natoms,"lib/gather:copy"); lmp->memory->create(copy,count*natoms,"lib/gather:copy");
for (i = 0; i < count*natoms; i++) copy[i] = 0; for (i = 0; i < count*natoms; i++) copy[i] = 0;
tagint *tag = lmp->atom->tag;
int nlocal = lmp->atom->nlocal; int nlocal = lmp->atom->nlocal;
if (count == 1) { if (count == 1) {
@ -1117,7 +1116,6 @@ void lammps_gather_atoms_subset(void *ptr, char *name,
lmp->memory->create(copy,count*ndata,"lib/gather:copy"); lmp->memory->create(copy,count*ndata,"lib/gather:copy");
for (i = 0; i < count*ndata; i++) copy[i] = 0; for (i = 0; i < count*ndata; i++) copy[i] = 0;
tagint *tag = lmp->atom->tag;
int nlocal = lmp->atom->nlocal; int nlocal = lmp->atom->nlocal;
if (count == 1) { if (count == 1) {
@ -1163,7 +1161,6 @@ void lammps_gather_atoms_subset(void *ptr, char *name,
lmp->memory->create(copy,count*ndata,"lib/gather:copy"); lmp->memory->create(copy,count*ndata,"lib/gather:copy");
for (i = 0; i < count*ndata; i++) copy[i] = 0.0; for (i = 0; i < count*ndata; i++) copy[i] = 0.0;
tagint *tag = lmp->atom->tag;
int nlocal = lmp->atom->nlocal; int nlocal = lmp->atom->nlocal;
if (count == 1) { if (count == 1) {