Skip to content

Commit

Permalink
Remove four unused parameters
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stweil committed Mar 22, 2019
1 parent dd79d56 commit 2ba194c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
16 changes: 7 additions & 9 deletions src/classify/intmatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ void IntegerMatcher::Match(INT_CLASS ClassTemplate,
}

if (DisplayProtoMatchesOn(Debug)) {
DisplayProtoDebugInfo(ClassTemplate, ProtoMask, ConfigMask,
DisplayProtoDebugInfo(ClassTemplate, ConfigMask,
*tables, SeparateDebugWindows);
}

Expand All @@ -510,8 +510,8 @@ void IntegerMatcher::Match(INT_CLASS ClassTemplate,
}
#endif

tables->UpdateSumOfProtoEvidences(ClassTemplate, ConfigMask, NumFeatures);
tables->NormalizeSums(ClassTemplate, NumFeatures, NumFeatures);
tables->UpdateSumOfProtoEvidences(ClassTemplate, ConfigMask);
tables->NormalizeSums(ClassTemplate, NumFeatures);

FindBestMatch(ClassTemplate, *tables, Result);

Expand Down Expand Up @@ -708,8 +708,7 @@ void ScratchEvidence::ClearFeatureEvidence(const INT_CLASS class_template) {
* @return none
*/
static void IMDebugConfiguration(int FeatureNum, uint16_t ActualProtoNum,
uint8_t Evidence, BIT_VECTOR ConfigMask,
uint32_t ConfigWord) {
uint8_t Evidence, uint32_t ConfigWord) {
cprintf ("F = %3d, P = %3d, E = %3d, Configs = ",
FeatureNum, (int) ActualProtoNum, (int) Evidence);
while (ConfigWord) {
Expand Down Expand Up @@ -830,7 +829,7 @@ int IntegerMatcher::UpdateTablesForFeature(
if (PrintFeatureMatchesOn (Debug))
IMDebugConfiguration (FeatureNum,
ActualProtoNum + proto_offset,
Evidence, ConfigMask, ConfigWord);
Evidence, ConfigWord);

ConfigWord &= *ConfigMask;

Expand Down Expand Up @@ -1004,7 +1003,6 @@ void IntegerMatcher::DebugFeatureProtoError(

void IntegerMatcher::DisplayProtoDebugInfo(
INT_CLASS ClassTemplate,
BIT_VECTOR ProtoMask,
BIT_VECTOR ConfigMask,
const ScratchEvidence& tables,
bool SeparateDebugWindows) {
Expand Down Expand Up @@ -1092,7 +1090,7 @@ void IntegerMatcher::DisplayFeatureDebugInfo(
* Add sum of Proto Evidences into Sum Of Feature Evidence Array
*/
void ScratchEvidence::UpdateSumOfProtoEvidences(
INT_CLASS ClassTemplate, BIT_VECTOR ConfigMask, int16_t NumFeatures) {
INT_CLASS ClassTemplate, BIT_VECTOR ConfigMask) {

int *IntPointer;
uint32_t ConfigWord;
Expand Down Expand Up @@ -1133,7 +1131,7 @@ void ScratchEvidence::UpdateSumOfProtoEvidences(
* the Feature Lengths and the Proto Lengths for each configuration.
*/
void ScratchEvidence::NormalizeSums(
INT_CLASS ClassTemplate, int16_t NumFeatures, int32_t used_features) {
INT_CLASS ClassTemplate, int16_t NumFeatures) {

for (int i = 0; i < ClassTemplate->NumConfigs; i++) {
sum_feature_evidence_[i] = (sum_feature_evidence_[i] << 8) /
Expand Down
6 changes: 2 additions & 4 deletions src/classify/intmatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ struct ScratchEvidence {

void Clear(const INT_CLASS class_template);
void ClearFeatureEvidence(const INT_CLASS class_template);
void NormalizeSums(INT_CLASS ClassTemplate, int16_t NumFeatures,
int32_t used_features);
void NormalizeSums(INT_CLASS ClassTemplate, int16_t NumFeatures);
void UpdateSumOfProtoEvidences(
INT_CLASS ClassTemplate, BIT_VECTOR ConfigMask, int16_t NumFeatures);
INT_CLASS ClassTemplate, BIT_VECTOR ConfigMask);
};


Expand Down Expand Up @@ -153,7 +152,6 @@ class IntegerMatcher {

void DisplayProtoDebugInfo(
INT_CLASS ClassTemplate,
BIT_VECTOR ProtoMask,
BIT_VECTOR ConfigMask,
const ScratchEvidence &tables,
bool SeparateDebugWindows);
Expand Down

0 comments on commit 2ba194c

Please sign in to comment.