From cb10da06be01faf00927626ca1281559dfe754c7 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 9 Oct 2021 20:56:22 +0200 Subject: [PATCH] training: Fix some signed/unsigned compiler warnings Signed-off-by: Stefan Weil --- src/training/common/commontraining.cpp | 3 +-- src/training/common/mastertrainer.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/training/common/commontraining.cpp b/src/training/common/commontraining.cpp index 67d3992338..aa9660532f 100644 --- a/src/training/common/commontraining.cpp +++ b/src/training/common/commontraining.cpp @@ -434,7 +434,6 @@ CLUSTERER *SetUpForClustering(const FEATURE_DEFS_STRUCT &FeatureDefs, LABELEDLIS const char *program_feature_type) { uint16_t N; CLUSTERER *Clusterer; - int32_t CharID; LIST FeatureList = nullptr; FEATURE_SET FeatureSet = nullptr; @@ -443,7 +442,7 @@ CLUSTERER *SetUpForClustering(const FEATURE_DEFS_STRUCT &FeatureDefs, LABELEDLIS Clusterer = MakeClusterer(N, FeatureDefs.FeatureDesc[desc_index]->ParamDesc); FeatureList = char_sample->List; - CharID = 0; + uint32_t CharID = 0; std::vector Sample; iterate(FeatureList) { FeatureSet = reinterpret_cast(FeatureList->first_node()); diff --git a/src/training/common/mastertrainer.cpp b/src/training/common/mastertrainer.cpp index 678205a040..be86055ff6 100644 --- a/src/training/common/mastertrainer.cpp +++ b/src/training/common/mastertrainer.cpp @@ -592,7 +592,7 @@ CLUSTERER *MasterTrainer::SetupForClustering(const ShapeTable &shape_table, for (it.Begin(); !it.AtEnd(); it.Next()) { sample_ptrs.push_back(&it.GetSample()); } - int sample_id = 0; + uint32_t sample_id = 0; for (int i = sample_ptrs.size() - 1; i >= 0; --i) { const TrainingSample *sample = sample_ptrs[i]; uint32_t num_features = sample->num_micro_features();