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
This commit is contained in:
Steffen Jaeckel 2017-08-01 18:02:58 +02:00
parent 32355d04bb
commit 7a59f71af8
2 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ int der_decode_sequence_multi(const unsigned char *in, unsigned long inlen, ...)
va_start(args, inlen);
x = 0;
for (;;) {
type = va_arg(args, ltc_asn1_type);
type = (ltc_asn1_type)va_arg(args, int);
size = va_arg(args, unsigned long);
data = va_arg(args, void*);
LTC_UNUSED_PARAM(size);
@ -94,7 +94,7 @@ int der_decode_sequence_multi(const unsigned char *in, unsigned long inlen, ...)
va_start(args, inlen);
x = 0;
for (;;) {
type = va_arg(args, ltc_asn1_type);
type = (ltc_asn1_type)va_arg(args, int);
size = va_arg(args, unsigned long);
data = va_arg(args, void*);

View File

@ -40,7 +40,7 @@ int der_encode_sequence_multi(unsigned char *out, unsigned long *outlen, ...)
va_start(args, outlen);
x = 0;
for (;;) {
type = va_arg(args, ltc_asn1_type);
type = (ltc_asn1_type)va_arg(args, int);
size = va_arg(args, unsigned long);
data = va_arg(args, void*);
LTC_UNUSED_PARAM(size);
@ -95,7 +95,7 @@ int der_encode_sequence_multi(unsigned char *out, unsigned long *outlen, ...)
va_start(args, outlen);
x = 0;
for (;;) {
type = va_arg(args, ltc_asn1_type);
type = (ltc_asn1_type)va_arg(args, int);
size = va_arg(args, unsigned long);
data = va_arg(args, void*);