The unused function list

Andrew Bartlett abartlet at
Fri Sep 7 00:03:51 MDT 2012

On Fri, 2012-09-07 at 07:52 +0200, Volker Lendecke wrote:
> On Fri, Sep 07, 2012 at 10:36:27AM +1000, Andrew Bartlett wrote:
> > Just a reminder that we generate a list of unused functions at:
> > 
> >
> > 
> > Some of these functions are from heimdal, pidl or complete an API that
> > isn't fully used, but there are others that are just unused, and could
> > be removed.  (And of course unused code is very much untested code).
> > 
> > (This list, and the code coverage functions were out of date for a
> > while, but are now generated on a twice daily basis).
> This list can't be right. For example ctdb_packet_flush is
> definitely used. It is a bad API, but in the current code it
> is part of the basic code connecting to ctdb. So please do
> not remove it and its users, this would completely break our
> cluster offering.

On the contrary, this is a genuine bug!  source3/lib/ctdb_packet.c is
compiled unconditionally, but the code that uses it is in
source3/lib/ctdbd_conn.c is all under #ifdef CLUSTER_SUPPORT.

Like any tool the result needs to be used intelligently.  In this case
one approach might be to put ctdb_packet under #ifdef CLUSTER_SUPPORT
and rely on the ctdb build in autobuild to ensure this doesn't break

I hope this explains things better,

Andrew Bartlett

Andrew Bartlett                      
Authentication Developer, Samba Team 

More information about the samba-technical mailing list