suppress bogus compiler warnings about overflowing buffer size in memcpy()

This commit is contained in:
Axel Kohlmeyer
2024-12-26 22:53:44 -05:00
parent 48178ccc50
commit 5ece81323e
6 changed files with 24 additions and 17 deletions

View File

@ -409,9 +409,9 @@ void Dump::write()
int nlocal = atom->nlocal;
if (nlocal > maxpbc) pbc_allocate();
if (nlocal) {
memcpy(&xpbc[0][0],&atom->x[0][0],3*nlocal*sizeof(double));
memcpy(&vpbc[0][0],&atom->v[0][0],3*nlocal*sizeof(double));
memcpy(imagepbc,atom->image,nlocal*sizeof(imageint));
memcpy(&xpbc[0][0],&atom->x[0][0],(3*nlocal*sizeof(double))&memcpymask);
memcpy(&vpbc[0][0],&atom->v[0][0],(3*nlocal*sizeof(double))&memcpymask);
memcpy(imagepbc,atom->image,(nlocal*sizeof(imageint))&memcpymask);
}
xhold = atom->x;
vhold = atom->v;