Skip to content

Commit fc30535

Browse files
committed
Fix compilation issues identified by CI
* Fix signed vs. unsiged warning * Fix ambiguous std::max() overload * Fix unused variable warning
1 parent 205c8be commit fc30535

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/mesh/exodusII_io_helper.C

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2236,7 +2236,10 @@ ExodusII_IO_Helper::set_dof_object_unique_id(
22362236
// enabled.
22372237
#ifdef LIBMESH_ENABLE_UNIQUE_ID
22382238
unique_id_type next_unique_id = mesh.next_unique_id();
2239-
mesh.set_next_unique_id(std::max(next_unique_id, exodus_mapped_id_zero_based + 1));
2239+
mesh.set_next_unique_id(std::max(next_unique_id, static_cast<unique_id_type>(exodus_mapped_id_zero_based + 1)));
2240+
#else
2241+
// Avoid compiler warnings about the unused variable
2242+
libmesh_ignore(mesh);
22402243
#endif
22412244
}
22422245
}
@@ -3076,7 +3079,7 @@ void ExodusII_IO_Helper::write_elements(const MeshBase & mesh, bool use_disconti
30763079
// Store num_elem_this_blk "fake" ids into the
30773080
// elem_num_map. Use a traditional for-loop to avoid unused
30783081
// variable warnings about the loop counter.
3079-
for (unsigned int i=0; i<num_elem_this_blk; ++i)
3082+
for (int i=0; i<num_elem_this_blk; ++i)
30803083
this->elem_num_map.push_back(next_fake_id++);
30813084
}
30823085

0 commit comments

Comments
 (0)