Skip to content

Commit

Permalink
Fix CID 1386109 (Logically dead code)
Browse files Browse the repository at this point in the history
The else statement is never executed.

Remove also an unused element from the names array
and add the "static" attribute.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed May 3, 2018
1 parent c3ed6f0 commit 11609f9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/training/classifier_tester.cpp
Expand Up @@ -39,7 +39,7 @@ enum ClassifierName {
CN_COUNT
};

const char* names[] = {"pruner", "full", nullptr};
static const char* names[] = {"pruner", "full"};

static tesseract::ShapeClassifier* InitializeClassifier(
const char* classifer_name, const UNICHARSET& unicharset,
Expand Down Expand Up @@ -83,9 +83,6 @@ static tesseract::ShapeClassifier* InitializeClassifier(
shape_classifier = new tesseract::TessClassifier(true, classify);
} else if (classifier == CN_FULL) {
shape_classifier = new tesseract::TessClassifier(false, classify);
} else {
fprintf(stderr, "%s tester not yet implemented\n", classifer_name);
return nullptr;
}
tprintf("Testing classifier %s:\n", classifer_name);
return shape_classifier;
Expand Down

0 comments on commit 11609f9

Please sign in to comment.