Mercurial > hg > octave-shane > gnulib-hg
changeset 17579:2f05c67c13f6
md5, sha1, sha256, sha512: fix compile error in c++ mode
* lib/gl_openssl.h: Cast void pointers to a specific type.
author | Alexander V. Lukyanov <lav@netis.ru> |
---|---|
date | Thu, 12 Dec 2013 11:19:29 +0000 |
parents | e98f72a517c4 |
children | f20720b48838 |
files | ChangeLog lib/gl_openssl.h |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-12-12 Alexander V. Lukyanov <lav@netis.ru> + + md5, sha1, sha256, sha512: fix (trivial) compile error in c++ mode. + * lib/gl_openssl.h: Cast void pointers to a specific type. + 2013-12-07 Pádraig Brady <P@draigBrady.com> open-tests: fix build failure with -Werror=old-style-declaration
--- a/lib/gl_openssl.h +++ b/lib/gl_openssl.h @@ -91,18 +91,18 @@ GL_OPENSSL_INLINE void * GL_CRYPTO_FN (_finish_ctx) (struct _gl_ctx *ctx, void *res) -{ OPENSSL_FN (_Final) (res, (_gl_CTX *) ctx); return res; } +{ OPENSSL_FN (_Final) ((unsigned char *) res, (_gl_CTX *) ctx); return res; } GL_OPENSSL_INLINE void * GL_CRYPTO_FN (_buffer) (const char *buf, size_t len, void *res) -{ return OPENSSL_FN () ((const unsigned char *) buf, len, res); } +{ return OPENSSL_FN () ((const unsigned char *) buf, len, (unsigned char *) res); } GL_OPENSSL_INLINE void * GL_CRYPTO_FN (_read_ctx) (const struct _gl_ctx *ctx, void *res) { /* Assume any unprocessed bytes in ctx are not to be ignored. */ _gl_CTX tmp_ctx = *(_gl_CTX *) ctx; - OPENSSL_FN (_Final) (res, &tmp_ctx); + OPENSSL_FN (_Final) ((unsigned char *) res, &tmp_ctx); return res; }