[vlc-devel] [PATCH v2 13/13] vorepository: use vlc_MakeTmpFile (thus mkstemp) instead of tempnam

Lyndon Brown jnqnfe at gmail.com
Wed Oct 7 02:43:41 CEST 2020

On Tue, 2020-10-06 at 22:41 +0300, Rémi Denis-Courmont wrote:
> Le tiistaina 6. lokakuuta 2020, 22.14.14 EEST Lyndon Brown a écrit :
> > All I'm doing here is micro-targetting the cause of the build
> > warning
> > about use of tempnam().
> Nobody will or can force you to fix warnings. But if you're not going
> to fix 
> them properly, leave them be for someone else to fix.

I don't think that's a very fair comment. I *am* attempting to
"properly" fix those that I tackle, or at the very least improve
things. I put in effort here to implement a solution built upon use of
a close equivalent to the problematic function, which fundamentally
*is* a "proper" solution to the problem. Not identifying a better
solution, if there is one to find, due to lack of time or
understanding, doesn't make the solution I've offered any less of a
"proper" fix, just not necessarily the best.

I am certainly not refusing to fix any issues with my solution. I'm not
trying to waste our time here. I'm trying to put together something
that stands a reasonable chance of being accepted, as with all my work.

I've noted your feedback, that in this case you don't believe that we
really need a FS entry for the vorepository instance. My understanding
of that, as I said, suggests that vlc_memfd might thus be what you have
in mind as a better alternative than trying to switch to mkstemp. I
expect that this would be very trivial for me to implement as an
alternative patch to #13 here, and I'm perfectly willing to try it. If
you can just confirm that this is correct and is what you want then
I'll see about tackling it.

I may have misread your previous comment perhaps; I wasn't sure whether
you might otherwise be questioning the whole use of the temporary file,
and thus considering re-engineering things to get rid of it. On that
basis I felt that if this is where you wanted to take things then it
was stepping well outside of the scope of work I was attempting and
taking me a little "out of my depth" with my current understanding of
that module's code, thus suggesting that I'd quite possibly need to
"tap out" and let someone else do that work.

More information about the vlc-devel mailing list