Skip to content

Commit 61c4376

Browse files
committed
whisper : fix possible uninitialized variables (ggml-org#291)
1 parent f822f20 commit 61c4376

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

whisper.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -3091,10 +3091,10 @@ static std::vector<whisper_token_data> whisper_sample_token_topk(
30913091
std::vector<whisper_token_data> result;
30923092
result.reserve(k);
30933093

3094-
whisper_token tid;
3094+
whisper_token tid = vocab.token_beg;
30953095

3096-
float pt;
3097-
float ptsum;
3096+
float pt = 0.0;
3097+
float ptsum = 0.0;
30983098

30993099
{
31003100
double sum_ts = 0.0;

0 commit comments

Comments
 (0)