mktemp warning mitigation

Andrew Bartlett abartlet at pcug.org.au
Tue Feb 27 10:21:40 GMT 2001


My understanding is that the Samba team regards the warnings issued by
newer gcc compilers (2.96 from RedHat in my case) as spurious, however I
would like to propose a solution that might mitigate this problem - as
least in the number of times the warnings appear:

If the smbd_mktemp function is moved to a separate file, and this
separate file only linked into the programs actually requiring the
smbd_mktemp functionality, then a build results in only one or two
warnings, not one per program.  This can be achieved quite simply, and
should not affect compatibility.

The next step is to actually use the mkstemp function when it makes
sense - like in reply.c, but I suspect that samba's wide platform base
might become an issue in this case.  I don't see any program (apart from
torture.c) that could not use mkstemp if required.

Anyway, that's my two bobs worth,
Andrew Bartlett

-- 
Andrew Bartlett
abartlet at pcug.org.au




More information about the samba-technical mailing list