On Thu, Apr 4, 2013 at 12:21 PM, Anton Malov <[email protected]> wrote: > Keeping trying to build master branch using VS 2012. In the very start > of building following error appears: > > d:\myprogram\openssl\crypto\cryptlib.c(313) : error C2220: warning > treated as error - no 'object' file generated > d:\myprogram\openssl\crypto\cryptlib.c(313) : warning C4700: > uninitialized local variable 'fmt' used > > This is a piece of code near cryptlib.c(313) > > void OPENSSL_showfatal (const char *fmta,...) > { va_list ap; > TCHAR buf[256]; > const TCHAR *fmt; > #ifdef STD_ERROR_HANDLE /* what a dirty trick! */ > HANDLE h; > > if ((h=GetStdHandle(STD_ERROR_HANDLE)) != NULL && > GetFileType(h)!=FILE_TYPE_UNKNOWN) > { /* must be console application */ > int len; > DWORD out; > > va_start (ap,fmta); > len=_vsnprintf((char *)buf,sizeof(buf),fmt,ap); > WriteFile(h,buf,len<0?sizeof(buf):(DWORD)len,&out,NULL); > va_end (ap); > return; > } > #endif > > if (sizeof(TCHAR)==sizeof(char)) > fmt=(const TCHAR *)fmta; > else do // convert codepage > > and I think that part enclosed by STD_ERROR_HANDLE defines should go > after initialization of fmt variable. > > Best regards, Anton Malov.
Actually I do not understand why can't be the buffer just printed to stderr since h=GetStdHandle(STD_ERROR_HANDLE) is used only for checking console mode i.e. stderr presence. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [email protected]
