mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 01:24:36 +00:00
whisper: fix printf format string (#894)
This format string uses %d to print uint32_t and size_t{ype,}, which is not guaranteed to work. Instead, use PRIu32 for uint32_t, and %zu for size_t.
This commit is contained in:
parent
813cf829b5
commit
1c5e05e477
1 changed files with 4 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <vector>
|
||||
#include <cstring>
|
||||
#include <mutex>
|
||||
#include <cinttypes>
|
||||
|
||||
#define COMMON_SAMPLE_RATE 16000
|
||||
|
||||
|
@ -50,7 +51,8 @@ static std::vector<float> resample_wav(const std::vector<float>& input, uint32_t
|
|||
|
||||
if(whisperdebugmode==1)
|
||||
{
|
||||
printf("\nResample wav from %d to %d (in size: %d, out size: %d)", input_rate,output_rate,input_size,output.size());
|
||||
printf("\nResample wav from %" PRIu32 " to %" PRIu32 " (in size: %zu, out size: %zu)",
|
||||
input_rate, output_rate, input_size, static_cast<std::size_t>(output.size()));
|
||||
}
|
||||
|
||||
// Perform simple linear interpolation resampling
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue