Skip to content

Commit 2ba194c

Browse files
committed
Remove four unused parameters
This fixes some compiler warnings: src/classify/intmatcher.cpp:711:63: warning: unused parameter ‘ConfigMask’ [-Wunused-parameter] src/classify/intmatcher.cpp:1007:16: warning: unused parameter ‘ProtoMask’ [-Wunused-parameter] src/classify/intmatcher.cpp:1095:61: warning: unused parameter ‘NumFeatures’ [-Wunused-parameter] src/classify/intmatcher.cpp:1136:59: warning: unused parameter ‘used_features’ [-Wunused-parameter] Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent dd79d56 commit 2ba194c

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

src/classify/intmatcher.cpp

+7-9
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ void IntegerMatcher::Match(INT_CLASS ClassTemplate,
499499
}
500500

501501
if (DisplayProtoMatchesOn(Debug)) {
502-
DisplayProtoDebugInfo(ClassTemplate, ProtoMask, ConfigMask,
502+
DisplayProtoDebugInfo(ClassTemplate, ConfigMask,
503503
*tables, SeparateDebugWindows);
504504
}
505505

@@ -510,8 +510,8 @@ void IntegerMatcher::Match(INT_CLASS ClassTemplate,
510510
}
511511
#endif
512512

513-
tables->UpdateSumOfProtoEvidences(ClassTemplate, ConfigMask, NumFeatures);
514-
tables->NormalizeSums(ClassTemplate, NumFeatures, NumFeatures);
513+
tables->UpdateSumOfProtoEvidences(ClassTemplate, ConfigMask);
514+
tables->NormalizeSums(ClassTemplate, NumFeatures);
515515

516516
FindBestMatch(ClassTemplate, *tables, Result);
517517

@@ -708,8 +708,7 @@ void ScratchEvidence::ClearFeatureEvidence(const INT_CLASS class_template) {
708708
* @return none
709709
*/
710710
static void IMDebugConfiguration(int FeatureNum, uint16_t ActualProtoNum,
711-
uint8_t Evidence, BIT_VECTOR ConfigMask,
712-
uint32_t ConfigWord) {
711+
uint8_t Evidence, uint32_t ConfigWord) {
713712
cprintf ("F = %3d, P = %3d, E = %3d, Configs = ",
714713
FeatureNum, (int) ActualProtoNum, (int) Evidence);
715714
while (ConfigWord) {
@@ -830,7 +829,7 @@ int IntegerMatcher::UpdateTablesForFeature(
830829
if (PrintFeatureMatchesOn (Debug))
831830
IMDebugConfiguration (FeatureNum,
832831
ActualProtoNum + proto_offset,
833-
Evidence, ConfigMask, ConfigWord);
832+
Evidence, ConfigWord);
834833

835834
ConfigWord &= *ConfigMask;
836835

@@ -1004,7 +1003,6 @@ void IntegerMatcher::DebugFeatureProtoError(
10041003

10051004
void IntegerMatcher::DisplayProtoDebugInfo(
10061005
INT_CLASS ClassTemplate,
1007-
BIT_VECTOR ProtoMask,
10081006
BIT_VECTOR ConfigMask,
10091007
const ScratchEvidence& tables,
10101008
bool SeparateDebugWindows) {
@@ -1092,7 +1090,7 @@ void IntegerMatcher::DisplayFeatureDebugInfo(
10921090
* Add sum of Proto Evidences into Sum Of Feature Evidence Array
10931091
*/
10941092
void ScratchEvidence::UpdateSumOfProtoEvidences(
1095-
INT_CLASS ClassTemplate, BIT_VECTOR ConfigMask, int16_t NumFeatures) {
1093+
INT_CLASS ClassTemplate, BIT_VECTOR ConfigMask) {
10961094

10971095
int *IntPointer;
10981096
uint32_t ConfigWord;
@@ -1133,7 +1131,7 @@ void ScratchEvidence::UpdateSumOfProtoEvidences(
11331131
* the Feature Lengths and the Proto Lengths for each configuration.
11341132
*/
11351133
void ScratchEvidence::NormalizeSums(
1136-
INT_CLASS ClassTemplate, int16_t NumFeatures, int32_t used_features) {
1134+
INT_CLASS ClassTemplate, int16_t NumFeatures) {
11371135

11381136
for (int i = 0; i < ClassTemplate->NumConfigs; i++) {
11391137
sum_feature_evidence_[i] = (sum_feature_evidence_[i] << 8) /

src/classify/intmatcher.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ struct ScratchEvidence {
7373

7474
void Clear(const INT_CLASS class_template);
7575
void ClearFeatureEvidence(const INT_CLASS class_template);
76-
void NormalizeSums(INT_CLASS ClassTemplate, int16_t NumFeatures,
77-
int32_t used_features);
76+
void NormalizeSums(INT_CLASS ClassTemplate, int16_t NumFeatures);
7877
void UpdateSumOfProtoEvidences(
79-
INT_CLASS ClassTemplate, BIT_VECTOR ConfigMask, int16_t NumFeatures);
78+
INT_CLASS ClassTemplate, BIT_VECTOR ConfigMask);
8079
};
8180

8281

@@ -153,7 +152,6 @@ class IntegerMatcher {
153152

154153
void DisplayProtoDebugInfo(
155154
INT_CLASS ClassTemplate,
156-
BIT_VECTOR ProtoMask,
157155
BIT_VECTOR ConfigMask,
158156
const ScratchEvidence &tables,
159157
bool SeparateDebugWindows);

0 commit comments

Comments
 (0)