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
This commit is contained in:
Jeffrey Altman
2022-01-05 14:04:55 -05:00
parent 2375fa9d1e
commit 6b788c2378

View File

@@ -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)