SQLite User Forum

warning: function may return address of local variable [-Wreturn-local-addr]
Login
On second thought, there is a way to work around this false-positive warning
(I think - I don't have a convenient way to test it.)  See my proposed
work-around on the [cgo-warning-workaround branch][1].

This work-around makes SQLite very slightly larger and slower.
So then the question becomes:  Do we allow SQLite to grow slightly larger
and slower on billions of devices all over the world in order to silence
a false-positive compiler warning from CGo?  To be fair, we have already
done that for MSVC.  But MSVC seems like a more important compiler than CGo.
I think I'll leave the patch on the branch while we ponder this question.

[1]: https://www.sqlite.org/src/vdiff?branch=cgo-warning-workaround&dc=20