ggerganov commited on
Commit
f31830b
·
unverified ·
1 Parent(s): 7d451fb

whisper : fix possible uninitialized variables (#291)

Browse files
Files changed (1) hide show
  1. whisper.cpp +3 -3
whisper.cpp CHANGED
@@ -3091,10 +3091,10 @@ static std::vector<whisper_token_data> whisper_sample_token_topk(
3091
  std::vector<whisper_token_data> result;
3092
  result.reserve(k);
3093
 
3094
- whisper_token tid;
3095
 
3096
- float pt;
3097
- float ptsum;
3098
 
3099
  {
3100
  double sum_ts = 0.0;
 
3091
  std::vector<whisper_token_data> result;
3092
  result.reserve(k);
3093
 
3094
+ whisper_token tid = vocab.token_beg;
3095
 
3096
+ float pt = 0.0;
3097
+ float ptsum = 0.0;
3098
 
3099
  {
3100
  double sum_ts = 0.0;