print size_t by casting to unsigned long and use right printf format
tags are unsigned integers git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15679 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -55,7 +55,7 @@ loop (unsigned char *buf, size_t len, int indent)
|
|||||||
int ret;
|
int ret;
|
||||||
Der_class class;
|
Der_class class;
|
||||||
Der_type type;
|
Der_type type;
|
||||||
int tag;
|
unsigned int tag;
|
||||||
size_t sz;
|
size_t sz;
|
||||||
size_t length;
|
size_t length;
|
||||||
size_t loop_length = 0;
|
size_t loop_length = 0;
|
||||||
@@ -112,7 +112,7 @@ loop (unsigned char *buf, size_t len, int indent)
|
|||||||
(unsigned)length, (unsigned)len);
|
(unsigned)length, (unsigned)len);
|
||||||
}
|
}
|
||||||
if (class == ASN1_C_CONTEXT || class == ASN1_C_APPL) {
|
if (class == ASN1_C_CONTEXT || class == ASN1_C_APPL) {
|
||||||
printf ("%d bytes [%d]\n", length, tag);
|
printf ("%lu bytes [%u]\n", (unsigned long)length, tag);
|
||||||
if (type == CONS)
|
if (type == CONS)
|
||||||
loop_length = loop (buf, length, indent + 2);
|
loop_length = loop (buf, length, indent + 2);
|
||||||
} else if (class == ASN1_C_UNIV) {
|
} else if (class == ASN1_C_UNIV) {
|
||||||
@@ -142,7 +142,8 @@ loop (unsigned char *buf, size_t len, int indent)
|
|||||||
errx (1, "der_get_integer: %s", error_message (ret));
|
errx (1, "der_get_integer: %s", error_message (ret));
|
||||||
printf ("integer %d\n", val);
|
printf ("integer %d\n", val);
|
||||||
} else {
|
} else {
|
||||||
printf ("BIG NUM integer: length %d\n", length);
|
printf ("BIG NUM integer: length %lu\n",
|
||||||
|
(unsigned long)length);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user