Fix warnings

The benefit is that nanomsg can now be compiled with `-Wall -Wextra -Werror` (at least on linux), and this should help avoiding warnings accidentally get into the master (using `./configure CFLAGS="-Werror"`)