Skip to content

Commit 7a59f71

Browse files
committed
fix warning
warning: 'ltc_asn1_type {aka enum ltc_asn1_type_}' is promoted to 'int' when passed through '...' type = va_arg(args, ltc_asn1_type); note: (so you should pass 'int' not 'ltc_asn1_type {aka enum ltc_asn1_type_}' to 'va_arg') note: if this code is reached, the program will abort
1 parent 32355d0 commit 7a59f71

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/pk/asn1/der/sequence/der_decode_sequence_multi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ int der_decode_sequence_multi(const unsigned char *in, unsigned long inlen, ...)
3939
va_start(args, inlen);
4040
x = 0;
4141
for (;;) {
42-
type = va_arg(args, ltc_asn1_type);
42+
type = (ltc_asn1_type)va_arg(args, int);
4343
size = va_arg(args, unsigned long);
4444
data = va_arg(args, void*);
4545
LTC_UNUSED_PARAM(size);
@@ -94,7 +94,7 @@ int der_decode_sequence_multi(const unsigned char *in, unsigned long inlen, ...)
9494
va_start(args, inlen);
9595
x = 0;
9696
for (;;) {
97-
type = va_arg(args, ltc_asn1_type);
97+
type = (ltc_asn1_type)va_arg(args, int);
9898
size = va_arg(args, unsigned long);
9999
data = va_arg(args, void*);
100100

src/pk/asn1/der/sequence/der_encode_sequence_multi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ int der_encode_sequence_multi(unsigned char *out, unsigned long *outlen, ...)
4040
va_start(args, outlen);
4141
x = 0;
4242
for (;;) {
43-
type = va_arg(args, ltc_asn1_type);
43+
type = (ltc_asn1_type)va_arg(args, int);
4444
size = va_arg(args, unsigned long);
4545
data = va_arg(args, void*);
4646
LTC_UNUSED_PARAM(size);
@@ -95,7 +95,7 @@ int der_encode_sequence_multi(unsigned char *out, unsigned long *outlen, ...)
9595
va_start(args, outlen);
9696
x = 0;
9797
for (;;) {
98-
type = va_arg(args, ltc_asn1_type);
98+
type = (ltc_asn1_type)va_arg(args, int);
9999
size = va_arg(args, unsigned long);
100100
data = va_arg(args, void*);
101101

0 commit comments

Comments
 (0)