On Sun, Nov 29, 2009 at 11:45:26AM +0100, Tobias Heer wrote: > > I pimped diego's #define search construction to let it search for > unused c functions with the help of ctags. The result is a list of > unused functions in pisa. Maybe some of them could be removed or it > could be investigated why these are unused. > > ./performance/pisaperf.h:59:int pisa_perf_enabled(void); > ./performance/pisaperf.c:19:int pisa_perf_enabled(void){ Trivial, removed. > ./performance/pisaperf.h:67:void pisa_perf_start_benchmark(pisa_perf_set * > pisa_perf_set, int slot); > ./performance/pisaperf.c:142:void pisa_perf_start_benchmark(pisa_perf_set > *in_perf_set, int slot){ > ./performance/pisaperf.h:69:void pisa_perf_stop_benchmark(pisa_perf_set * > pisa_perf_set, int slot); > ./performance/pisaperf.c:164:void pisa_perf_stop_benchmark(pisa_perf_set > *in_perf_set, int slot){ This might be useful for, well, benchmarking, so I think it might be worth keeping for now. > ./libpisa/debug.c:295:void pisa_hexdump(const char *file, int line, const > char *function, > ./libpisa/debug.h:87: pisa_hexdump(__FILE__, __LINE__, > __FUNCTION__, prefix, str, len) > ./libpisa/debug.h:141:void pisa_hexdump(const char *file, int line, const > char *function, > ./libpisa/debug.c:346:int pisa_hexdump_parsed(const char *file, int line, > const char *function, > ./libpisa/debug.h:66:int pisa_hexdump_parsed(const char *file, int line, > const char *function, > ./libpisa/debug.h:89: pisa_hexdump_parsed(__FILE__, __LINE__, > __FUNCTION__, prefix, str, len) This could be a useful debugging aid, Thomas? > ./libpisa/debug.c:522:void pisa_uint8_to_binstring(uint8_t val, char *buffer) > > ./libpisa/debug.h:150:void pisa_uint8_to_binstring(uint8_t val, char > *buffer); > ./libpisa/debug.c:543:void pisa_uint16_to_binstring(uint16_t val, char > *buffer) > ./libpisa/debug.h:151:void pisa_uint16_to_binstring(uint16_t val, char > *buffer); > ./libpisa/debug.c:564:void pisa_uint32_to_binstring(uint32_t val, char > *buffer) > ./libpisa/debug.h:152:void pisa_uint32_to_binstring(uint32_t val, char > *buffer); I think these can go away, Thomas? > ./libpisa/util.h:71:int pisa_maxof(int num_args, ...); > ./libpisa/util.c:63:int pisa_maxof(int num_args, ...) This one is trivial, removed. > ./libpisa/packet.h:126:bool is_pisatun_packet(const char *data); > ./libpisa/packet.c:24:bool is_pisatun_packet(const char *data) > ./libpisa/packet.h:130:void pisa_send_control_packet_ipv4_type(int fd, struct > sockaddr_in* addr, pisa_tlv_type type); > ./libpisa/packet.c:51:void pisa_send_control_packet_ipv4_type(int fd, struct > sockaddr_in* addr, pisa_tlv_type type) Already removed. > ./libpisa/packet.h:137:uint8_t pisa_get_packet_version(const pisa_packet > *pkt); > ./libpisa/packet.c:131:uint8_t pisa_get_packet_version(const pisa_packet > *pkt) > ./libpisa/packet.h:140:pisa_packet_flags pisa_get_packet_flags(const > pisa_packet *pkt); > ./libpisa/packet.c:164:pisa_packet_flags pisa_get_packet_flags(const > pisa_packet *pkt) > ./libpisa/packet.h:145:void pisa_set_packet_flags(pisa_packet *pkt, > pisa_packet_flags flags); > ./libpisa/packet.c:208:void pisa_set_packet_flags(pisa_packet *pkt, > pisa_packet_flags flags) There are similar functions for other struct members, but the functions are very trivial. Keep? Remove? Thomas? > ./libpisa/conmgr.h:129:void pisa_conmgr_iterate(pisa_conmgr_list *conlist, > conmgr_callback cb, void* data); > ./libpisa/conmgr.c:183:void pisa_conmgr_iterate(pisa_conmgr_list *conlist, > conmgr_callback cb, void* data) Trivial, removed. Diego