silence some more compiler warnings

This commit is contained in:
Axel Kohlmeyer
2022-10-31 18:02:58 -04:00
parent 135c6f24ad
commit 131522f241
2 changed files with 5 additions and 13 deletions

View File

@ -131,7 +131,7 @@ TEST_F(LAMMPS_configuration, has_package)
"REACTION","REAXFF","REPLICA","RIGID","SCAFACOS","SHOCK","SMTBQ","SPH","SPIN","SRD","STUBS",
"TALLY","UEF","VORONOI","VTK","YAFF","CG-SPICA","AMOEBA"};
for (int i = 0; i < pkg_name.size(); i++)
for (std::size_t i = 0; i < pkg_name.size(); i++)
EXPECT_EQ(f_lammps_has_package(pkg_name[i].c_str()),
Info::has_package(pkg_name[i]));
}
@ -233,11 +233,11 @@ TEST_F(LAMMPS_configuration, get_gpu_info)
TEST_F(LAMMPS_configuration, has_style)
{
Info info(lmp);
for (int c = 0; c < style_category.size(); c++)
for (std::size_t c = 0; c < style_category.size(); c++)
{
std::vector<std::string> name =
info.get_available_styles(style_category[c]);
for (int s = 0; s < name.size(); s++)
for (std::size_t s = 0; s < name.size(); s++)
{
EXPECT_EQ(f_lammps_has_style(style_category[c].c_str(),
name[s].c_str()), info.has_style(style_category[c], name[s]));
@ -249,7 +249,7 @@ TEST_F(LAMMPS_configuration, has_style)
TEST_F(LAMMPS_configuration, style_count)
{
Info info(lmp);
for (int i = 0; i < style_category.size(); i++)
for (std::size_t i = 0; i < style_category.size(); i++)
EXPECT_EQ(f_lammps_style_count(style_category[i].c_str()),
info.get_available_styles(style_category[i].c_str()).size());
};
@ -258,7 +258,7 @@ TEST_F(LAMMPS_configuration, style_name)
{
char *buffer;
Info info(lmp);
for (int c = 0; c < style_category.size(); c++) {
for (std::size_t c = 0; c < style_category.size(); c++) {
int nnames = f_lammps_style_count(style_category[c].c_str());
auto styles = info.get_available_styles(style_category[c]);
for (int i = 0; i < nnames; i++) {

View File

@ -54,14 +54,12 @@ TEST_F(LAMMPS_create_atoms, create_three)
#else
int *tag, *image;
#endif
int *type;
double **x, **v;
EXPECT_EQ(lmp->atom->nlocal, 3);
tag = lmp->atom->tag;
image = lmp->atom->image;
x = lmp->atom->x;
v = lmp->atom->v;
type = lmp->atom->type;
f_lammps_create_three_atoms();
EXPECT_EQ(lmp->atom->nlocal, 6);
for (int i = 0; i < lmp->atom->nlocal; i++) {
@ -103,7 +101,6 @@ TEST_F(LAMMPS_create_atoms, create_two_more)
#else
int *tag, *image;
#endif
int *type;
double **x, **v;
f_lammps_create_three_atoms();
EXPECT_EQ(lmp->atom->nlocal, 6);
@ -113,7 +110,6 @@ TEST_F(LAMMPS_create_atoms, create_two_more)
image = lmp->atom->image;
x = lmp->atom->x;
v = lmp->atom->v;
type = lmp->atom->type;
for (int i = 0; i < lmp->atom->nlocal; i++) {
if (tag[i] == 7) {
EXPECT_EQ(image[i],lammps_encode_image_flags(0,0,0));
@ -144,7 +140,6 @@ TEST_F(LAMMPS_create_atoms, create_two_more_bigsmall)
#else
int *tag, *image;
#endif
int *type;
double **x, **v;
f_lammps_create_three_atoms();
EXPECT_EQ(lmp->atom->nlocal, 6);
@ -158,7 +153,6 @@ TEST_F(LAMMPS_create_atoms, create_two_more_bigsmall)
image = lmp->atom->image;
x = lmp->atom->x;
v = lmp->atom->v;
type = lmp->atom->type;
for (int i = 0; i < lmp->atom->nlocal; i++) {
if (tag[i] == 7) {
EXPECT_EQ(image[i],lammps_encode_image_flags(-1,0,0));
@ -189,7 +183,6 @@ TEST_F(LAMMPS_create_atoms, create_two_more_bigsmall2)
#else
int *tag, *image;
#endif
int *type;
double **x, **v;
f_lammps_create_three_atoms();
EXPECT_EQ(lmp->atom->nlocal, 6);
@ -203,7 +196,6 @@ TEST_F(LAMMPS_create_atoms, create_two_more_bigsmall2)
image = lmp->atom->image;
x = lmp->atom->x;
v = lmp->atom->v;
type = lmp->atom->type;
for (int i = 0; i < lmp->atom->nlocal; i++) {
if (tag[i] == 7) {
EXPECT_EQ(image[i],lammps_encode_image_flags(0,0,0));