silence compiler warnings

This commit is contained in:
Axel Kohlmeyer 2022-12-01 10:51:04 -05:00
parent 6365af8704
commit 65488ca217
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
6 changed files with 14 additions and 21 deletions

View File

@ -411,7 +411,6 @@ void FixTTMGrid::write_restart_file(const char *file)
if (fpout == nullptr) if (fpout == nullptr)
error->one(FLERR,"Cannot open fix ttm/grid restart file {}: {}",outfile,utils::getsyserror()); error->one(FLERR,"Cannot open fix ttm/grid restart file {}: {}",outfile,utils::getsyserror());
bigint ngrid = (bigint) nxgrid * nygrid * nzgrid;
fmt::print(fpout,"# DATE: {} UNITS: {} COMMENT: " fmt::print(fpout,"# DATE: {} UNITS: {} COMMENT: "
"Electron temperature on {}x{}x{} grid at step {} - " "Electron temperature on {}x{}x{} grid at step {} - "
"created by fix {}\n", "created by fix {}\n",

View File

@ -425,7 +425,7 @@ void DumpGrid::header_binary_triclinic(bigint ndump)
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void DumpGrid::header_item(bigint ndump) void DumpGrid::header_item(bigint /*ndump*/)
{ {
if (unit_flag && !unit_count) { if (unit_flag && !unit_count) {
++unit_count; ++unit_count;
@ -445,7 +445,7 @@ void DumpGrid::header_item(bigint ndump)
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void DumpGrid::header_item_triclinic(bigint ndump) void DumpGrid::header_item_triclinic(bigint /*ndump*/)
{ {
if (unit_flag && !unit_count) { if (unit_flag && !unit_count) {
++unit_count; ++unit_count;

View File

@ -74,7 +74,7 @@ void DumpGridVTK::init_style()
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void DumpGridVTK::write_header(bigint ndump) void DumpGridVTK::write_header(bigint /*ndump*/)
{ {
if (me) return; if (me) return;

View File

@ -31,7 +31,7 @@ class DumpGridVTK : public DumpGrid {
protected: protected:
int mode; int mode;
double *xcoord,*ycoord,*zcoord; double *xcoord, *ycoord, *zcoord;
// methods // methods

View File

@ -1372,7 +1372,7 @@ void DumpImage::grid_cell_corners_2d(int ix, int iy)
} }
} else { } else {
double lamda[3],xone[3]; double lamda[3];
lamda[2] = 0.0; lamda[2] = 0.0;
double dx = 1.0 / nxgrid; double dx = 1.0 / nxgrid;
@ -1411,7 +1411,7 @@ void DumpImage::grid_cell_corners_3d(int ix, int iy, int iz)
} }
} else { } else {
double lamda[3],xone[3]; double lamda[3];
double dx = 1.0 / nxgrid; double dx = 1.0 / nxgrid;
double dy = 1.0 / nygrid; double dy = 1.0 / nygrid;

View File

@ -518,8 +518,6 @@ void FixAveGrid::setup(int /*vflag*/)
void FixAveGrid::end_of_step() void FixAveGrid::end_of_step()
{ {
int m,ix,iy,iz;
// skip if not step which requires doing something // skip if not step which requires doing something
bigint ntimestep = update->ntimestep; bigint ntimestep = update->ntimestep;
@ -1524,7 +1522,7 @@ void FixAveGrid::deallocate_one_grid(GridData *grid,
if ATOM mode, also include per-grid count if ATOM mode, also include per-grid count
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
double FixAveGrid::size_grid(GridData *grid) double FixAveGrid::size_grid(GridData * /*grid*/)
{ {
int nper = nvalues; int nper = nvalues;
if (modeatom) nper++; if (modeatom) nper++;
@ -1867,8 +1865,6 @@ void FixAveGrid::unpack_reverse_grid(int /*which*/, void *vbuf, int nlist, int *
void FixAveGrid::pack_remap_grid(int /*which*/, void *vbuf, int nlist, int *list) void FixAveGrid::pack_remap_grid(int /*which*/, void *vbuf, int nlist, int *list)
{ {
int i,j,m,iwindow;
auto buf = (double *) vbuf; auto buf = (double *) vbuf;
int running_flag = 0; int running_flag = 0;
@ -1876,13 +1872,13 @@ void FixAveGrid::pack_remap_grid(int /*which*/, void *vbuf, int nlist, int *list
int window_flag = 0; int window_flag = 0;
if (aveflag == WINDOW) window_flag = 1; if (aveflag == WINDOW) window_flag = 1;
m = 0; int m = 0;
for (i = 0; i < nlist; i++) { for (int i = 0; i < nlist; i++) {
m += pack_one_grid(grid_sample_previous,list[i],&buf[m]); m += pack_one_grid(grid_sample_previous,list[i],&buf[m]);
m += pack_one_grid(grid_nfreq_previous,list[i],&buf[m]); m += pack_one_grid(grid_nfreq_previous,list[i],&buf[m]);
if (running_flag) m += pack_one_grid(grid_running_previous,list[i],&buf[m]); if (running_flag) m += pack_one_grid(grid_running_previous,list[i],&buf[m]);
if (window_flag) if (window_flag)
for (iwindow = 0; iwindow < nwindow; iwindow++) for (int iwindow = 0; iwindow < nwindow; iwindow++)
m += pack_one_grid(grid_window_previous[iwindow],list[i],&buf[m]); m += pack_one_grid(grid_window_previous[iwindow],list[i],&buf[m]);
} }
} }
@ -1894,22 +1890,20 @@ void FixAveGrid::pack_remap_grid(int /*which*/, void *vbuf, int nlist, int *list
void FixAveGrid::unpack_remap_grid(int /*which*/, void *vbuf, int nlist, int *list) void FixAveGrid::unpack_remap_grid(int /*which*/, void *vbuf, int nlist, int *list)
{ {
int i,j,m,iwindow; auto buf = (double *) vbuf;
auto buf = (double *) vbuf;
int running_flag = 0; int running_flag = 0;
if (aveflag == RUNNING || aveflag == WINDOW) running_flag = 1; if (aveflag == RUNNING || aveflag == WINDOW) running_flag = 1;
int window_flag = 0; int window_flag = 0;
if (aveflag == WINDOW) window_flag = 1; if (aveflag == WINDOW) window_flag = 1;
m = 0; int m = 0;
for (i = 0; i < nlist; i++) { for (int i = 0; i < nlist; i++) {
m += unpack_one_grid(&buf[m],grid_sample,list[i]); m += unpack_one_grid(&buf[m],grid_sample,list[i]);
m += unpack_one_grid(&buf[m],grid_nfreq,list[i]); m += unpack_one_grid(&buf[m],grid_nfreq,list[i]);
if (running_flag) m += unpack_one_grid(&buf[m],grid_running,list[i]); if (running_flag) m += unpack_one_grid(&buf[m],grid_running,list[i]);
if (window_flag) if (window_flag)
for (iwindow = 0; iwindow < nwindow; iwindow++) for (int iwindow = 0; iwindow < nwindow; iwindow++)
m += unpack_one_grid(&buf[m],grid_window[iwindow],list[i]); m += unpack_one_grid(&buf[m],grid_window[iwindow],list[i]);
} }
} }