From 30be5aaaacd2de37fac07b4070b7c2a89f3e9691 Mon Sep 17 00:00:00 2001 From: chrismamo1 Date: Tue, 30 Oct 2018 18:00:32 -0600 Subject: [PATCH 1/2] fix a couple minor compiler warnings --- src/ccstruct/normalis.cpp | 1 - src/ccutil/genericvector.h | 2 +- src/textord/colpartition.cpp | 1 - src/wordrec/findseam.cpp | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ccstruct/normalis.cpp b/src/ccstruct/normalis.cpp index fc6c728a..8fd51c11 100644 --- a/src/ccstruct/normalis.cpp +++ b/src/ccstruct/normalis.cpp @@ -410,7 +410,6 @@ void DENORM::DenormTransform(const DENORM* last_denorm, const FCOORD& pt, // Normalize a blob using blob transformations. Less accurate, but // more accurately copies the old way. void DENORM::LocalNormBlob(TBLOB* blob) const { - TBOX blob_box = blob->bounding_box(); ICOORD translation(-IntCastRounded(x_origin_), -IntCastRounded(y_origin_)); blob->Move(translation); if (y_scale_ != 1.0f) diff --git a/src/ccutil/genericvector.h b/src/ccutil/genericvector.h index e0d31b47..d2a809e6 100644 --- a/src/ccutil/genericvector.h +++ b/src/ccutil/genericvector.h @@ -983,7 +983,7 @@ template bool GenericVector::SkipDeSerialize(tesseract::TFile* fp) { uint32_t reserved; if (fp->FReadEndian(&reserved, sizeof(reserved), 1) != 1) return false; - return fp->FRead(nullptr, sizeof(T), reserved) == reserved; + return (uint32_t)fp->FRead(nullptr, sizeof(T), reserved) == reserved; } // Writes a vector of classes to the given file. Assumes the existence of diff --git a/src/textord/colpartition.cpp b/src/textord/colpartition.cpp index 0167d59f..4c966a3d 100644 --- a/src/textord/colpartition.cpp +++ b/src/textord/colpartition.cpp @@ -1153,7 +1153,6 @@ bool ColPartition::MarkAsLeaderIfMonospaced() { bool modified_blob_list = false; for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) { BLOBNBOX* blob = it.data(); - TBOX box = blob->bounding_box(); // If the first or last blob is spaced too much, don't mark it. if (it.at_first()) { int gap = it.data_relative(1)->bounding_box().left() - diff --git a/src/wordrec/findseam.cpp b/src/wordrec/findseam.cpp index 81055392..653336eb 100644 --- a/src/wordrec/findseam.cpp +++ b/src/wordrec/findseam.cpp @@ -132,7 +132,7 @@ void Wordrec::choose_best_seam(SeamQueue *seam_queue, const SPLIT *split, TBOX bbox = blob->bounding_box(); /* Queue loop */ while (!seam_queue->empty()) { - SeamPair seam_pair; + SeamPair seam_pair(); seam_queue->Pop(&seam_pair); seam = seam_pair.extract_data(); /* Set full priority */ From 439dfaaf8b4e40e00b00facb7fd203e68975e3ce Mon Sep 17 00:00:00 2001 From: chrismamo1 Date: Tue, 30 Oct 2018 18:10:48 -0600 Subject: [PATCH 2/2] un-fix one of the warnings --- src/wordrec/findseam.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wordrec/findseam.cpp b/src/wordrec/findseam.cpp index 653336eb..81055392 100644 --- a/src/wordrec/findseam.cpp +++ b/src/wordrec/findseam.cpp @@ -132,7 +132,7 @@ void Wordrec::choose_best_seam(SeamQueue *seam_queue, const SPLIT *split, TBOX bbox = blob->bounding_box(); /* Queue loop */ while (!seam_queue->empty()) { - SeamPair seam_pair(); + SeamPair seam_pair; seam_queue->Pop(&seam_pair); seam = seam_pair.extract_data(); /* Set full priority */