From 6b788c237827e7bee7be0cab9d93669a5fab9268 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Wed, 5 Jan 2022 14:04:55 -0500 Subject: [PATCH] lib/asn1: template cast integer const to uintptr_t then void ptr Cast integer constants to (void *) with an intermediate cast to (uintptr_t). On Windows this avoid warnings about a signed integer being cast to a pointer of larger size. No functional change. Change-Id: I7289fb772870c5f492c1a8b988e0d80cf008b7f4 --- lib/asn1/template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/asn1/template.c b/lib/asn1/template.c index 9c2d41f4c..ff1357810 100644 --- a/lib/asn1/template.c +++ b/lib/asn1/template.c @@ -1828,7 +1828,7 @@ _asn1_length_open_type_id(const struct asn1_template *t, const void *data) { struct asn1_template pretend[2] = { - { 0, 0, ((void*)1) }, + { 0, 0, ((void*)(uintptr_t)1) }, }; pretend[1] = *t; while ((t->tt & A1_OP_MASK) == A1_OP_TAG)