Skip to content

Commit

Permalink
Fix size/sign conversion warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar committed Sep 27, 2024
1 parent e9cb2e9 commit 1c5cc3c
Show file tree
Hide file tree
Showing 6 changed files with 1,137 additions and 1,152 deletions.
3 changes: 2 additions & 1 deletion packages/seacas/libraries/exodus/src/ex_field_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ const char *ex_component_field_name(ex_field *field, int component[EX_MAX_FIELD_

// Return the name of the field corresponding to the specified 1-based component(s)
static char field_name[EX_MAX_NAME + 1];
const char *suffices[EX_MAX_FIELD_NESTING] = {NULL};
const char *suffices[EX_MAX_FIELD_NESTING + 1] = {NULL};
for (int i = 0; i < field->nesting; i++) {
suffices[i] = ex_field_component_suffix(field, i, component[i]);
}
suffices[EX_MAX_FIELD_NESTING] = NULL;

// Build up name incrementally which makes it easier to handle an empty component_separator...
sprintf(field_name, "%s", field->name);
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/libraries/ioss/src/Ioss_ChainGenerator.C
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ namespace Ioss {
{
region.get_database()->progress(__func__);

debug = debug_level;
size_t numel = region.get_property("element_count").get_int();
debug = debug_level;
auto numel = region.get_property("element_count").get_int();

// Determine which element block(s) are adjacent to the faceset specifying "lines"
// The `adjacent_blocks` contains the names of all element blocks that are adjacent to the
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/libraries/ioss/src/Ioss_ElementTopology.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ namespace Ioss {

private:
IOSS_NODISCARD bool equal_(const Ioss::ElementTopology &rhs, bool quiet) const;
const std::string name_;
const std::string masterElementName_;
const std::string name_{};
const std::string masterElementName_{};

static const std::string &topology_shape_to_permutation_name(Ioss::ElementShape topoShape);

Expand Down
5 changes: 1 addition & 4 deletions packages/seacas/libraries/ioss/src/Ioss_EntityBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@

namespace Ioss {
class DatabaseIO;
} // namespace Ioss
namespace Ioss {
class ElementTopology;
} // namespace Ioss

namespace Ioss {
class ElementBlock;

/** \brief Base class for all 'block'-type grouping entities, which means all
* members of the block are similar or have the same topology.
*
Expand Down Expand Up @@ -56,6 +52,7 @@ namespace Ioss {
{
return idOffset < local_id && local_id <= idOffset + entityCount;
}

/** \brief Set the 'offset' for the block.
*
* The 'offset' is used to map an element location within an
Expand Down
5 changes: 2 additions & 3 deletions packages/seacas/libraries/suplib_cpp/iqsort.C
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ namespace {
}
}

template <typename T, typename INT>
size_t median3(const T v[], INT iv[], size_t left, size_t right)
template <typename T, typename INT> INT median3(const T v[], INT iv[], size_t left, size_t right)
{
size_t center = (left + right) / 2;
size_t pl = left;
Expand All @@ -101,7 +100,7 @@ namespace {
template <typename T, typename INT> void iqsort(const T v[], INT iv[], size_t left, size_t right)
{
if (left + QSORT_CUTOFF <= right) {
size_t pivot = median3(v, iv, left, right);
INT pivot = median3(v, iv, left, right);
size_t i = left;
size_t j = right - 1;

Expand Down
Loading

0 comments on commit 1c5cc3c

Please sign in to comment.