Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warnings #1039

Merged
merged 3 commits into from
Jul 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ccmain/equationdetect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1516,4 +1516,4 @@ void EquationDetect::PrintSpecialBlobsDensity(const ColPartition* part) const {
tprintf("\n");
}

}; // namespace tesseract
} // namespace tesseract
6 changes: 3 additions & 3 deletions ccstruct/blobbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class BLOBNBOX:public ELIST_LINK
}
void set_reduced_box(TBOX new_box) {
red_box = new_box;
reduced = TRUE;
reduced = true;
}
inT32 enclosed_area() const {
return area;
Expand Down Expand Up @@ -503,8 +503,8 @@ class BLOBNBOX:public ELIST_LINK
TBOX box; // bounding box
TBOX red_box; // bounding box
int area:30; // enclosed area
int joined:1; // joined to prev
int reduced:1; // reduced box set
unsigned joined:1; // joined to prev
unsigned reduced:1; // reduced box set
int repeated_set_; // id of the set of repeated blobs
TabType left_tab_type_; // Indicates tab-stop assessment
TabType right_tab_type_; // Indicates tab-stop assessment
Expand Down
2 changes: 1 addition & 1 deletion ccstruct/blobs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const TPOINT kDivisibleVerticalItalic(1, 5);
F u n c t i o n s
----------------------------------------------------------------------*/

CLISTIZE(EDGEPT);
CLISTIZE(EDGEPT)

// Returns true when the two line segments cross each other.
// (Moved from outlines.cpp).
Expand Down
2 changes: 1 addition & 1 deletion ccstruct/blobs.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ struct EDGEPT {
};

// For use in chop and findseam to keep a list of which EDGEPTs were inserted.
CLISTIZEH(EDGEPT);
CLISTIZEH(EDGEPT)

struct TESSLINE {
TESSLINE() : is_hole(false), loop(NULL), next(NULL) {}
Expand Down
4 changes: 2 additions & 2 deletions ccstruct/ratngs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

using tesseract::ScriptPos;

ELISTIZE(BLOB_CHOICE);
ELISTIZE(WERD_CHOICE);
ELISTIZE(BLOB_CHOICE)
ELISTIZE(WERD_CHOICE)

const float WERD_CHOICE::kBadRating = 100000.0;
// Min offset in baseline-normalized coords to make a character a subscript.
Expand Down
2 changes: 1 addition & 1 deletion ccutil/ambigs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ AmbigSpec::AmbigSpec() {
wrong_ngram_size = 0;
}

ELISTIZE(AmbigSpec);
ELISTIZE(AmbigSpec)

// Initializes the ambigs by adding a NULL pointer to each table.
void UnicharAmbigs::InitUnicharAmbigs(const UNICHARSET& unicharset,
Expand Down
2 changes: 1 addition & 1 deletion ccutil/ambigs.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class AmbigSpec : public ELIST_LINK {
AmbigType type;
int wrong_ngram_size;
};
ELISTIZEH(AmbigSpec);
ELISTIZEH(AmbigSpec)

// AMBIG_TABLE[i] stores a set of ambiguities whose
// wrong ngram starts with unichar id i.
Expand Down
3 changes: 2 additions & 1 deletion ccutil/unicharcompress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ static bool DecodeRadicalStrokeTable(STRING* radical_stroke_table,
radical_stroke_table->split('\n', &lines);
for (int i = 0; i < lines.size(); ++i) {
if (lines[i].length() == 0 || lines[i][0] == '#') continue;
int unicode, radical, strokes;
unsigned unicode;
int radical, strokes;
STRING str_radical;
if (sscanf(lines[i].string(), "%x\t%d.%d", &unicode, &radical, &strokes) ==
3) {
Expand Down
2 changes: 1 addition & 1 deletion cutil/structures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
/*----------------------------------------------------------------------
F u n c t i o n s
----------------------------------------------------------------------*/
makestructure(new_cell, free_cell, list_rec);
makestructure(new_cell, free_cell, list_rec)
2 changes: 1 addition & 1 deletion textord/equationdetectbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ void EquationDetectBase::RenderSpecialText(Pix* pix,
boxDestroy(&box);
}

}; // namespace tesseract
} // namespace tesseract
2 changes: 1 addition & 1 deletion textord/equationdetectbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ class EquationDetectBase {
static void RenderSpecialText(Pix* pix, BLOBNBOX* blob);
};

}; // namespace tesseract
} // namespace tesseract

#endif // TESSERACT_TEXTORD_EQUATIONDETECTBASE_H_
2 changes: 1 addition & 1 deletion wordrec/lm_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

namespace tesseract {

ELISTIZE(ViterbiStateEntry);
ELISTIZE(ViterbiStateEntry)

void ViterbiStateEntry::Print(const char *msg) const {
tprintf("%s ViterbiStateEntry", msg);
Expand Down
2 changes: 1 addition & 1 deletion wordrec/lm_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ struct ViterbiStateEntry : public ELIST_LINK {
STRING *debug_str;
};

ELISTIZEH(ViterbiStateEntry);
ELISTIZEH(ViterbiStateEntry)

/// Struct to store information maintained by various language model components.
struct LanguageModelState {
Expand Down