Hello.

I found an issue compiling OpenSSL 1.0.1f on the Windows platform.  Compiler 
used is Visual Studio 2012.

The error from the compile is as follows:

        cl /Fotmp32dll.dbg\s23_clnt.obj  -Iinc32 -Itmp32dll.dbg /MDd /Od -DDEBUG
 -D_DEBUG -DZLIB -DOPENSSL_THREADS  -DDSO_WIN32 -W3 -WX -Gs0 -GF -Gy -Zi -nologo
 -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRE
CATE -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPE
NSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DA
ES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DOPENSSL_USE_APPLINK -I. -DOPENS
SL_NO_RC5 -DOPENSSL_NO_MD2 -DOPENSSL_NO_KRB5 -DOPENSSL_NO_JPAKE -DZLIB -DOPENSSL
_NO_DYNAMIC_ENGINE -D_USING_V110_SDK71_ /Zi /Fdtmp32dll.dbg/libeay32 -D_WINDLL
-DOPENSSL_BUILD_SHLIBSSL -c .\ssl\s23_clnt.c
s23_clnt.c
.\ssl\s23_clnt.c(286) : error C2220: warning treated as error - no 'object' file
 generated
.\ssl\s23_clnt.c(286) : warning C4244: 'initializing' : conversion from 'time_t'
 to 'unsigned long', possible loss of data
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
\VC\BIN\cl.EXE"' : return code '0x2'
Stop.


s23_clnt.c should have a type cast on line 286.
                unsigned long Time = time(NULL);
       should be
                unsigned long Time = (unsigned long)time(NULL);

This is similar to line 148 where the same typecast is used.
        unsigned long Time=(unsigned long)time(NULL);

Adding the typecast prevents the compiler warning and resultant error.

Thanks.


Jeffrey A. Ding
IT - Principal Technical Analyst


Quad/Graphics
Innovative People Redefining Print

Sussex, Wisconsin
414-566-2609 phone

[email protected]
www.QG.com

Follow Quad/Graphics in social media<http://www.qg.com/socialmedia>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to