Navigation Menu

Skip to content

Commit

Permalink
Fix compiler warning (-Wmaybe-uninitialized)
Browse files Browse the repository at this point in the history
gcc warning:

    src/lstm/recodebeam.cpp:270:41: warning: ‘current_char’ may be used uninitialized in this function [-Wmaybe-uninitialized]

It's a false positive, but setting the variable to 0 satisfies the compiler.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Feb 9, 2019
1 parent 33f6dc2 commit 877e62d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lstm/recodebeam.cpp
Expand Up @@ -197,7 +197,7 @@ void RecodeBeamSearch::ExtractBestPathAsWords(const TBOX& line_box,
DebugUnicharPath(unicharset, second_nodes, unichar_ids, certs, ratings,
xcoords);
}
int current_char;
int current_char = 0;
int timestepEnd = 0;
//if lstm choice mode is required in granularity level 2 it stores the x
//Coordinates of every chosen character to match the alternative choices to it
Expand Down

0 comments on commit 877e62d

Please sign in to comment.