[openssl] master update
Dr. Paul Dale
pauli at openssl.org
Sun Nov 15 23:35:43 UTC 2020
The branch master has been updated
via fce56f5b690ea00447285fd928963f4d730c830a (commit)
from 3084b9d316d47f069a52c5009d6a3d638c76061e (commit)
- Log -----------------------------------------------------------------
commit fce56f5b690ea00447285fd928963f4d730c830a
Author: Daniel Bevenius <daniel.bevenius at gmail.com>
Date: Thu Nov 12 09:51:14 2020 +0100
REF_PRINT: cast pointer to void to avoid warnings
Currently, when configuring OpenSSL and specifying the --strict-warnings
option there are failures like the following one:
crypto/bio/bio_lib.c: In function 'BIO_up_ref':
include/internal/refcount.h:169:25: error: format '%p' expects argument
of type 'void *', but argument 3 has type 'BIO *'
{aka 'struct bio_st *'} [-Werror=format=]
169 | fprintf(stderr, "%p:%4d:%s\n", b, b->references, a)
| ^~~~~~~~~~~~~
crypto/bio/bio_lib.c:185:5:
note: in expansion of macro'REF_PRINT_COUNT'
185 | REF_PRINT_COUNT("BIO", a);
| ^~~~~~~~~~~~~~~
include/internal/refcount.h:169:27: note: format string is defined here
169 | fprintf(stderr, "%p:%4d:%s\n", b, b->references, a)
| ~^
| |
| void *
cc1: all warnings being treated as errors
This commit adds casts to avoid the warnings.
Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
Reviewed-by: Paul Dale <paul.dale at oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13389)
-----------------------------------------------------------------------
Summary of changes:
crypto/asn1/tasn_utl.c | 2 +-
include/internal/refcount.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/asn1/tasn_utl.c b/crypto/asn1/tasn_utl.c
index f7c988ede4..b455f0705a 100644
--- a/crypto/asn1/tasn_utl.c
+++ b/crypto/asn1/tasn_utl.c
@@ -97,7 +97,7 @@ int asn1_do_lock(ASN1_VALUE **pval, int op, const ASN1_ITEM *it)
if (!CRYPTO_DOWN_REF(lck, &ret, *lock))
return -1; /* failed */
#ifdef REF_PRINT
- fprintf(stderr, "%p:%4d:%s\n", it, ret, it->sname);
+ fprintf(stderr, "%p:%4d:%s\n", (void*)it, ret, it->sname);
#endif
REF_ASSERT_ISNT(ret < 0);
if (ret == 0) {
diff --git a/include/internal/refcount.h b/include/internal/refcount.h
index 1d1af772cc..0c07c42e26 100644
--- a/include/internal/refcount.h
+++ b/include/internal/refcount.h
@@ -166,7 +166,7 @@ typedef int CRYPTO_REF_COUNT;
# ifdef REF_PRINT
# define REF_PRINT_COUNT(a, b) \
- fprintf(stderr, "%p:%4d:%s\n", b, b->references, a)
+ fprintf(stderr, "%p:%4d:%s\n", (void*)b, b->references, a)
# else
# define REF_PRINT_COUNT(a, b)
# endif
More information about the openssl-commits
mailing list