Skip to content

Commit

Permalink
training: Fix some signed/unsigned compiler warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Oct 10, 2021
1 parent 5cce734 commit cb10da0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/training/common/commontraining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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<float> Sample;
iterate(FeatureList) {
FeatureSet = reinterpret_cast<FEATURE_SET>(FeatureList->first_node());
Expand Down
2 changes: 1 addition & 1 deletion src/training/common/mastertrainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit cb10da0

Please sign in to comment.