commit 773790c18bfbf1fb5aa02329aa0eeb8f6f766afb
parent 0dc4d1adaa0a85cf7f53f54dbcf5b217d8944b25
Author: Joris Vink <joris@coders.se>
Date: Wed, 17 Aug 2022 13:19:25 +0200
fix more fallout from printf format attributes.
Diffstat:
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/acme.c b/src/acme.c
@@ -1676,8 +1676,10 @@ acme_base64url(const void *data, size_t len)
{
char *b64;
- if (!kore_base64url_encode(data, len, &b64, KORE_BASE64_RAW))
- fatal("%s: failed to encode base64url data of %zu bytes", len);
+ if (!kore_base64url_encode(data, len, &b64, KORE_BASE64_RAW)) {
+ fatal("%s: failed to encode base64url data of %zu bytes",
+ __func__, len);
+ }
return (b64);
}
diff --git a/src/python.c b/src/python.c
@@ -4122,8 +4122,10 @@ pylock_aenter(struct pylock *lock, PyObject *args)
{
struct pylock_op *op;
- if (coro_running->lockop != NULL)
- fatal("%s: lockop not NULL for %u", __func__, coro_running->id);
+ if (coro_running->lockop != NULL) {
+ fatal("%s: lockop not NULL for %" PRIu64,
+ __func__, coro_running->id);
+ }
if (lock->owner != NULL && lock->owner->id == coro_running->id) {
PyErr_SetString(PyExc_RuntimeError, "recursive lock detected");
@@ -4153,8 +4155,10 @@ pylock_aexit(struct pylock *lock, PyObject *args)
{
struct pylock_op *op;
- if (coro_running->lockop != NULL)
- fatal("%s: lockop not NULL for %u", __func__, coro_running->id);
+ if (coro_running->lockop != NULL) {
+ fatal("%s: lockop not NULL for %" PRIu64,
+ __func__, coro_running->id);
+ }
if (lock->owner == NULL || lock->owner->id != coro_running->id) {
PyErr_SetString(PyExc_RuntimeError, "invalid lock owner");
@@ -4509,7 +4513,7 @@ pygather_reap_coro(struct pygather_op *op, struct python_coro *reap)
}
if (coro == NULL)
- fatal("coroutine %u not found in gather", reap->id);
+ fatal("coroutine %" PRIu64 " not found in gather", reap->id);
op->running--;
if (op->running < 0)
@@ -4820,7 +4824,7 @@ pyhttp_iterobj_next(struct pyhttp_iterobj *iterobj)
}
kore_buf_reset(&iterobj->buf);
- kore_buf_appendf(&iterobj->buf, "%x\r\n", length);
+ kore_buf_appendf(&iterobj->buf, "%lx\r\n", length);
kore_buf_append(&iterobj->buf, ptr, length);
kore_buf_appendf(&iterobj->buf, "\r\n");