diff options
author | Andy Polyakov <appro@openssl.org> | 2005-04-13 06:55:42 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2005-04-13 06:55:42 +0000 |
commit | 9e88c827037b9ca5fbf21c7a52f0628fccf6b4bb (patch) | |
tree | e6480bb000e6f088d9cdf2436e31f17ee2c5afe5 | |
parent | 9d2f51c086eb53f5f1cc0df9156eb398fcacf8dd (diff) | |
download | openssl-9e88c827037b9ca5fbf21c7a52f0628fccf6b4bb.tar.gz |
Minor cryptlib.c update: compiler warnings in OPENSSL_showfatal and
OPENSSL_stderr stub.
-rw-r--r-- | crypto/cryptlib.c | 13 | ||||
-rw-r--r-- | crypto/cryptlib.h | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 2782e3e603..b2674b2f22 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -645,9 +645,10 @@ static int IsService(void) } #endif -void OPENSSL_showfatal (char *fmta,...) +void OPENSSL_showfatal (const char *fmta,...) { va_list ap; - TCHAR buf[256],*fmt; + TCHAR buf[256] + const TCHAR *fmt; HANDLE h; if ((h=GetStdHandle(STD_ERROR_HANDLE)) != NULL && @@ -671,7 +672,7 @@ void OPENSSL_showfatal (char *fmta,...) #else fmtw = (WCHAR *)alloca (len_0*sizeof(WCHAR)); #endif - if (fmtw == NULL) { fmt=(TCHAR *)L"no stack?"; break; } + if (fmtw == NULL) { fmt=(const TCHAR *)L"no stack?"; break; } #ifndef OPENSSL_NO_MULTIBYTE if (!MultiByteToWideChar(CP_ACP,0,fmta,len_0,fmtw,len_0)) @@ -693,7 +694,7 @@ void OPENSSL_showfatal (char *fmta,...) } } while (keepgoing); } - fmt = (TCHAR *)fmtw; + fmt = (const TCHAR *)fmtw; } while (0); va_start (ap,fmta); @@ -728,7 +729,7 @@ void OPENSSL_showfatal (char *fmta,...) } } #else -void OPENSSL_showfatal (char *fmta,...) +void OPENSSL_showfatal (const char *fmta,...) { va_list ap; va_start (ap,fmta); @@ -744,3 +745,5 @@ void OpenSSLDie(const char *file,int line,const char *assertion) file,line,assertion); abort(); } + +void *OPENSSL_stderr(void) { return stderr; } diff --git a/crypto/cryptlib.h b/crypto/cryptlib.h index 8b0add7e20..1cc3b728b3 100644 --- a/crypto/cryptlib.h +++ b/crypto/cryptlib.h @@ -95,6 +95,8 @@ extern "C" { void OPENSSL_cpuid_setup(void); extern unsigned long OPENSSL_ia32cap_P; +void OPENSSL_showfatal(const char *,...); +void *OPENSSL_stderr(void); #ifdef __cplusplus } |