From e2b81a2d311470d503edae93e68e82791f6bb17c Mon Sep 17 00:00:00 2001 From: "Douglas B. Rumbaugh" Date: Fri, 6 Dec 2024 13:56:55 -0500 Subject: Warning fixes --- include/framework/DynamicExtension.h | 2 +- include/framework/structure/ExtensionStructure.h | 9 +++++---- include/util/types.h | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/framework/DynamicExtension.h b/include/framework/DynamicExtension.h index 16cbb0e..5a95679 100644 --- a/include/framework/DynamicExtension.h +++ b/include/framework/DynamicExtension.h @@ -565,7 +565,7 @@ private: vers->reconstruction(args->merges[0]); } } else { - for (ssize_t i = 0; i < args->merges.size(); i++) { + for (size_t i = 0; i < args->merges.size(); i++) { vers->reconstruction(args->merges[i].target, args->merges[i].sources[0]); } diff --git a/include/framework/structure/ExtensionStructure.h b/include/framework/structure/ExtensionStructure.h index 2728246..c81ad05 100644 --- a/include/framework/structure/ExtensionStructure.h +++ b/include/framework/structure/ExtensionStructure.h @@ -19,6 +19,7 @@ #include "framework/util/Configuration.h" #include "psu-util/timer.h" +#include "util/types.h" namespace de { @@ -427,7 +428,7 @@ public: auto new_level = InternalLevel::reconstruction( levels, task.target); - if (task.target >= m_levels.size()) { + if (task.target >= (level_index) m_levels.size()) { m_current_state.push_back({new_level->get_record_count(), calc_level_record_capacity(task.target), 1, 1}); @@ -461,7 +462,7 @@ public: level_index incoming_level) { size_t shard_capacity = (L == LayoutPolicy::LEVELING) ? 1 : m_scale_factor; - if (base_level >= m_levels.size()) { + if (base_level >= (level_index) m_levels.size()) { m_levels.emplace_back( std::shared_ptr>( new InternalLevel(base_level, @@ -583,7 +584,7 @@ private: return -1; size_t incoming_rec_cnt = state[idx].reccnt; - for (level_index i = idx + 1; i < state.size(); i++) { + for (level_index i = idx + 1; i < (level_index) state.size(); i++) { if (can_reconstruct_with(i, incoming_rec_cnt, state)) { return i; } @@ -661,7 +662,7 @@ private: */ inline bool can_reconstruct_with(level_index idx, size_t incoming_rec_cnt, state_vector &state) { - if (idx >= state.size()) { + if (idx >= (level_index) state.size()) { return false; } diff --git a/include/util/types.h b/include/util/types.h index b8a1343..c225857 100644 --- a/include/util/types.h +++ b/include/util/types.h @@ -80,7 +80,7 @@ typedef ssize_t level_index; typedef struct ReconstructionTask { std::vector sources; level_index target; - size_t reccnt; + size_t reccnt = 0; void add_source(level_index source, size_t cnt) { sources.push_back(source); -- cgit v1.2.3