From c882373baffec915efd2340937d069a75a1db234 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 22 Nov 2016 18:53:54 +0100 Subject: [PATCH] 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 --- ccstruct/blamer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccstruct/blamer.cpp b/ccstruct/blamer.cpp index 5d2837d084..4573e9b3f0 100644 --- a/ccstruct/blamer.cpp +++ b/ccstruct/blamer.cpp @@ -317,7 +317,7 @@ void BlamerBundle::SetChopperBlame(const WERD_RES* word, bool debug) { int num_blobs = word->chopped_word->blobs.size(); int box_index = 0; int blob_index = 0; - inT16 truth_x; + inT16 truth_x = -1; while (box_index < truth_word_.length() && blob_index < num_blobs) { truth_x = norm_truth_word_.BlobBox(box_index).right(); TBLOB * curr_blob = word->chopped_word->blobs[blob_index];