On Thursday 25 May 2006 17:02, Ladislav Michnovič wrote: > Hello. > Gcc complaints about uninitialized variable "err". IMHO that line is > probably unneeded. In file src/socket.cpp at line 1237. The code is: > > bool TCPSocket::SecureListen() > { ... > switch (j) > { > case SSL_ERROR_SSL: > err = ERR_get_error_line(&file, &line); > gLog.Warn("%sSSL_accept error = %lx, %s:%i\n", L_SSLxSTR, err, > file, line); > gLog.Warn("%s%s\n", L_SSLxSTR, ERR_error_string(err, 0)); > ERR_clear_error(); > break; > default: > gLog.Warn("%sSSL_accept error %d, SSL_%d\n", L_SSLxSTR, i, j); > gLog.Warn("%s%s\n", L_SSLxSTR, ERR_error_string(err, 0)); > //THIS LINE IMHO SHOULD NOT BE HERE > break;
err is uninitialized in case of "default:". Instead of removing the warning message from the code, it should get initialiazed properly. Bye, Thomas -- There are 10 kind of people. Those who understand binary, and those who don't.
pgpK9qWgmxB69.pgp
Description: PGP signature