You are correct.
Patch committed. Thanks!
-Bob
On Mon, May 08, 2017 at 08:20:57PM +0200, Jonas 'Sortie' Termansen wrote:
> Hi,
>
> When upgrading to libressl-2.5.4 I noticed a couple -Wformat errors due
> to this code assuming size_t is of type long when it was actually int on
> this 32-bit system. Here's a patch against cvs that fixes the issue and
> also prints the variableas unsigned type.
>
> Jonas
>
> Index: ocspcheck.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/ocspcheck/ocspcheck.c,v
> retrieving revision 1.20
> diff -u -r1.20 ocspcheck.c
> --- ocspcheck.c 27 Mar 2017 23:59:08 -0000 1.20
> +++ ocspcheck.c 8 May 2017 18:15:51 -0000
> @@ -564,7 +564,7 @@
> if ((request = ocsp_request_new_from_cert(certfile, nonce)) == NULL)
> exit(1);
>
> - dspew("Built an %ld byte ocsp request\n", request->size);
> + dspew("Built an %zu byte ocsp request\n", request->size);
>
> if ((host = url2host(request->url, &port, &path)) == NULL)
> errx(1, "Invalid OCSP url %s from %s", request->url,
> @@ -601,7 +601,7 @@
> dspew("Server at %s returns:\n", host);
> for (i = 0; i < httphsz; i++)
> dspew(" [%s]=[%s]\n", httph[i].key, httph[i].val);
> - dspew(" [Body]=[%ld bytes]\n", hget->bodypartsz);
> + dspew(" [Body]=[%zu bytes]\n", hget->bodypartsz);
> if (hget->bodypartsz <= 0)
> errx(1, "No body in reply from %s", host);
>
>