summaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorJ.W. Jagersma <jwjagersma@gmail.com>2022-10-01 18:41:44 +0200
committerPauli <pauli@openssl.org>2022-12-08 11:09:12 +1100
commit2ce940e54e9a1bbe1d99aa655567c91d715f74ab (patch)
tree0291360b5ae520b48cbc9d50547c213b0ecf7ab9 /crypto/asn1
parentf3e9308fe1b692c424feaa256fbecce958cef1f4 (diff)
Cast values to match printf format strings.
For some reason djgpp uses '(unsigned) long int' for (u)int32_t. This causes errors with -Werror=format, even though these types are in practice identical. Obvious solution: cast to the types indicated by the format string. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19843)
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/x_int64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/x_int64.c b/crypto/asn1/x_int64.c
index eb78c7e367..c15857cc55 100644
--- a/crypto/asn1/x_int64.c
+++ b/crypto/asn1/x_int64.c
@@ -224,8 +224,8 @@ static int uint32_print(BIO *out, const ASN1_VALUE **pval, const ASN1_ITEM *it,
int indent, const ASN1_PCTX *pctx)
{
if ((it->size & INTxx_FLAG_SIGNED) == INTxx_FLAG_SIGNED)
- return BIO_printf(out, "%d\n", **(int32_t **)pval);
- return BIO_printf(out, "%u\n", **(uint32_t **)pval);
+ return BIO_printf(out, "%d\n", (int)**(int32_t **)pval);
+ return BIO_printf(out, "%u\n", (unsigned int)**(uint32_t **)pval);
}