Commit a8dd3c8c authored by Martin Blix Grydeland's avatar Martin Blix Grydeland Committed by Dridi Boukelmoune

Cast to (u)intmax_t for %ju and %jd

This to silence errors on OSX where apparently int64_t isn't type
equivalent to intmax_t, causing printf-errors when using %jd.

Fixes: #3699
parent 5c4fbcc1
......@@ -29,6 +29,8 @@
#include "config.h"
#include <stdint.h>
#include "cache/cache_varnishd.h"
#include "cache/cache_transport.h"
......@@ -107,7 +109,7 @@ h2_sess_panic(struct vsb *vsb, const struct sess *sp)
VSB_printf(vsb, "t_send = %f, t_winupd = %f,\n",
r2->t_send, r2->t_winupd);
VSB_printf(vsb, "t_window = %jd, r_window = %jd,\n",
r2->t_window, r2->r_window);
(intmax_t)r2->t_window, (intmax_t)r2->r_window);
VSB_printf(vsb, "rxbuf = %p", r2->rxbuf);
if (r2->rxbuf != NULL) {
......@@ -117,7 +119,8 @@ h2_sess_panic(struct vsb *vsb, const struct sess *sp)
VSB_printf(vsb, "stvbuf = %p,\n", r2->rxbuf->stvbuf);
VSB_printf(vsb,
"{size, tail, head} = {%u, %ju, %ju},\n",
r2->rxbuf->size, r2->rxbuf->tail, r2->rxbuf->head);
r2->rxbuf->size, (uintmax_t)r2->rxbuf->tail,
(uintmax_t)r2->rxbuf->head);
VSB_indent(vsb, -2);
VSB_printf(vsb, "}");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment