Fix lots of compiler warnings (casts, unused vars, etc.)
authorSergio Durigan Junior <sergiodj@sergiodj.net>
Tue, 8 Apr 2014 05:54:48 +0000 (02:54 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br>
Tue, 8 Apr 2014 09:29:19 +0000 (06:29 -0300)
commitb875ed1319e55a2308aa3a6ec634415503030f85
tree94d7ae2ddfd0c16cc8204d0462ac131fe7e6edc6
parent4636f666bf48af964e51039bb0984f42d70ae473
Fix lots of compiler warnings (casts, unused vars, etc.)

As a preparation for a patch to create a spec file for the project (and
be able to generate RPM's for Fedora-like systems), this commit fixes
lots of warnings generated by the compiler when using more strict
flags.

Fedora, by default, uses the following flags to compile the program:

  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
  -fstack-protector-strong --param=ssp-buffer-size=4
  -grecord-gcc-switches -m%ARCH -mtune=generic

This generated lots of warnings (like missing casts, or unused
variables).  It is good to fix those in order to keep a sane codebase.
rnetclient.c