Skip to content

Commit c882373

Browse files
committed
Fix compiler warning (-Wmaybe-uninitialized)
gcc report: ccstruct/blamer.cpp:343:65: warning: 'truth_x' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent 51368c8 commit c882373

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ccstruct/blamer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ void BlamerBundle::SetChopperBlame(const WERD_RES* word, bool debug) {
317317
int num_blobs = word->chopped_word->blobs.size();
318318
int box_index = 0;
319319
int blob_index = 0;
320-
inT16 truth_x;
320+
inT16 truth_x = -1;
321321
while (box_index < truth_word_.length() && blob_index < num_blobs) {
322322
truth_x = norm_truth_word_.BlobBox(box_index).right();
323323
TBLOB * curr_blob = word->chopped_word->blobs[blob_index];

0 commit comments

Comments
 (0)