Compiler warning C4022 when building OpenSSL 0.9.8e On Windows

I got the following compiler error when building OpenSSL-0.9.8e in Windows environments with Visual studio 2005:

.\apps\enc.c(380) : error C2220: warning treated as error - no ‘object’ file generated
.\apps\enc.c(380) : warning C4022: ‘BIO_ctrl’ : pointer mismatch for actual parameter 4

Here is the quick fix to solve this compile error:

Open file .\apps\enc.c,Go to line 380:

if (BIO_read_filename(in,inf <= 0))
{
	perror(inf);
	goto end;
}

 Change it to

if (BIO_read_filename(in,(char*)(inf <= 0)))
{
	perror(inf);
	goto end;
}

you can download the compiled binary here.

Related posts:

TAGS: , , ,


3 Comments »

John Marshall On March 11th, 2008 at 5:36 am (#)

As I’m sure you’ve noticed by now, the way that typo has been fixed in 0.9.8g for example is (of course :-))

if (BIO_read_filename(in,inf) <= 0)

jill0001 On October 31st, 2007 at 1:30 pm (#)

袋式除尘器

University Update - Linux - Compile failure (C4022) when building OpenSSL 0.9.8e On Windows On August 25th, 2007 at 10:05 pm (#)

[...] Compile failure (C4022) when building OpenSSL 0.9.8e On Windows » This Summary is from an article posted at DEAN LEE:/DEV/BLOG on Saturday, August 25, 2007 I [...]


Leave a comment


(will not be published)