Files
LocalAI/backend/go
Ettore Di Giacinto 352b7113d0 fix(qwen3-tts-cpp): read the PCM buffer without go vet's unsafe.Pointer warning
go vet reported "possible misuse of unsafe.Pointer" for the uintptr that
the C library returns, and the //nolint:govet comment does not silence
vet itself. The line dates from the move to qwentts.cpp, not from the
batching work.

It is not a bug: the buffer is malloc'd by the C side, so the Go GC
neither moves nor frees it, and it is copied out before CppPCMFree runs.
Read the address through a pointer to the variable instead of converting
the uintptr, which is the form vet accepts and gives the same address.

Assisted-by: Claude:claude-sonnet-5-5 go-vet
2026-11-03 21:50:57 +00:00
..