Code cleanup

The attached patch shows the changes I've made to FreeBSD's copy of
Unbound, with inline comments, relative to 1.4.22. Most of them fix
compiler warnings or errors. I believe all of them are suitable for
inclusion in the standard distribution.

DES

(attachments)

unbound-freebsd.diff (45.1 KB)

[previous message with large patch is stuck in moderator queue]

I missed one: the prototype for libworker_event_done_cb() needs to be
moved from libunbound/libworker.h to libunbound/worker.h.

Index: libunbound/libworker.h

Hi Dag-Erling,

Thank you for this large cleanup patch. It makes a lot of fixes
around the code and that is very nice. I like the union approach to
the sockaddr_in confusion, that code tends to freak out compilers.
The header-file issues with declarations for worker.h are an artifact
of the test setup and the callback-check(fptr whitelist), sorry about
that.

unbound-control-setup in the Makefile did not support out-of-directory
builds. sldns_bgetc your notes and commit are different, the commit
is it.

Best regards,
   Wouter

Index: Makefile.in