[tor-dev] #if 0 unused functions?

Nick Mathewson nickm at alum.mit.edu
Mon Mar 23 03:27:25 UTC 2015


On Sun, Mar 22, 2015 at 12:12 AM, Sebastian Hahn
<sebastian at torproject.org> wrote:
> Hi there,
>
> we have some functions which we never call anywhere. In many cases, it
> appears we shouldn't delete them from the source because they "belong"
> there - the thing I initially stumbled across was
> ed25519_seckey_write_to_file(), for example. But I also don't see why
> compiling it and potentially including it in our binary makes any sense.
>
> Thoughts?

I think it's a different answer case-by-case.  For the function you
mention, it's going to get used by my #12498 patch, so it probably
shouldn't get disabled.  But for other unused functions, we might be
better off removing them entirely, rather than wrapping them away for
further use.

cheers,
-- 
Nick


More information about the tor-dev mailing list