From 90704baf76c16bfaaca2bb82a34517016583cba4 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Thu, 6 Jan 2022 17:52:09 +1100 Subject: [PATCH] asn1: use %zu format string for size_t --- lib/asn1/gen_encode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/asn1/gen_encode.c b/lib/asn1/gen_encode.c index b0123a8be..50fb9ddfe 100644 --- a/lib/asn1/gen_encode.c +++ b/lib/asn1/gen_encode.c @@ -551,15 +551,15 @@ encode_type (const char *name, const Type *t, const char *tmpstr) * \ * +-- psave_ */ - "e = der_put_tag(psave_%s, %lu, %s, %s, %d, &l2_%s);\n" + "e = der_put_tag(psave_%s, %zu, %s, %s, %d, &l2_%s);\n" "if (e) return e;\n" /* Restore `len' and adjust it (see `p' below) */ - "len = lensave_%s - (l + %lu - asn1_tag_length_%s);\n" + "len = lensave_%s - (l + %zu - asn1_tag_length_%s);\n" /* * Adjust `ret' to account for the difference in size * between the length of the right and wrong tags. */ - "ret += %lu - asn1_tag_length_%s;\n" + "ret += %zu - asn1_tag_length_%s;\n" /* Free the buffer and restore `p' */ "free(p + 1);\n" /* @@ -572,7 +572,7 @@ encode_type (const char *name, const Type *t, const char *tmpstr) * \ * +-- p */ - "p = psave_%s - (1 + %lu - asn1_tag_length_%s); }\n", + "p = psave_%s - (1 + %zu - asn1_tag_length_%s); }\n", tmpstr, tmpstr, t->subtype->symbol->name, tmpstr, t->subtype->symbol->name, t->subtype->symbol->name, tmpstr, length_tag(t->tag.tagvalue),