Add some missing casts to silence compiler warnings
Remove unused variables to silence compiler warnings
Add missing include

Silences:
  listen.c:320:3: warning: implicit declaration of function ‘ascii_strup’ [-Wimplicit-function-declaration]
Merge pull request #63 from dgl/cleanups

Clean-up some compiler warnings