2006/5/25, Thomas Reitelbach <[EMAIL PROTECTED]>:
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.
 Maybe you're right. I did not mentioned that in other functions
there is not such line in default case. It looks like somebody
cut&paste one line more, that was necesary. Maybe I'm wrong. The
author of the code will know what to do. I just wanted to point at
this problem.
 Regards Ladislav.
Ym…杽ŠíjŹĄňâžěLjv yŃč˛Ř§h­†‹­ś‚˘ËZÔb˛An–\­­¨§yŰ^râr&§ą8^†(!zËgşfŢŽ‡ŃyŃھǍś'âqŤb˘{"žŘ^†‹-Šx"ŰŹśź…jv­‰ĆĽJęi˘ťB–'$ś‰^jšć˘ˇĄśÚţÇĽjËŹ}Šdj
    ޡű•É

Reply via email to