More warning fixes

Got rid of all warnings when building server_release by eliminating several unused variables/dead code. Also fixed an incorrect sizeof parameter.