From 7c9f5e98479410541bdc615b3f03f98f77b617a2 Mon Sep 17 00:00:00 2001 From: Dusty Daemon Date: Thu, 3 Aug 2023 15:35:54 -0400 Subject: [PATCH] renepay: Use macros instead of manual format types Fixes 32-bit builds: ``` In file included from plugins/renepay/pay.c:5: ./plugins/renepay/pay_flow.h: In function 'fmt_payflow_key': ./plugins/renepay/pay_flow.h:54:17: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'u64' {aka 'long long unsigned int'} [-Werror=format=] 54 | "key: groupid=%ld, partid=%ld, payment_hash=%s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | k->groupid,k->partid, | ~~~~~~~~~~ | | | u64 {aka long long unsigned int} ``` etc --- plugins/renepay/pay.c | 4 ++-- plugins/renepay/pay_flow.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/renepay/pay.c b/plugins/renepay/pay.c index 933f5e549..27888cae4 100644 --- a/plugins/renepay/pay.c +++ b/plugins/renepay/pay.c @@ -877,9 +877,9 @@ payment_listsendpays_previous( plugin_log(pay_plugin->plugin,LOG_DBG, "There are pending sendpays to this invoice. " - "groupid = %ld, " + "groupid = %"PRIu64" " "delivering = %s, " - "last_partid = %ld", + "last_partid = %"PRIu64, last_pending_group_id, type_to_string(tmpctx,struct amount_msat,&p->total_delivering), last_pending_partid); diff --git a/plugins/renepay/pay_flow.h b/plugins/renepay/pay_flow.h index e96529daa..e519e9f7f 100644 --- a/plugins/renepay/pay_flow.h +++ b/plugins/renepay/pay_flow.h @@ -51,7 +51,7 @@ static inline const char* fmt_payflow_key( { char *str = tal_fmt( ctx, - "key: groupid=%ld, partid=%ld, payment_hash=%s", + "key: groupid=%"PRIu64", partid=%"PRIu64", payment_hash=%s", k->groupid,k->partid, type_to_string(ctx,struct sha256,k->payment_hash)); return str;