gnucash future: Fix printf format size error on macOS (PRIi64 won't format a size_t)
John Ralls
jralls at code.gnucash.org
Thu Jul 9 16:18:21 EDT 2026
Updated via https://github.com/Gnucash/gnucash/commit/8a9abe81 (commit)
from https://github.com/Gnucash/gnucash/commit/35029adc (commit)
commit 8a9abe818dbe95af06bc0904cbe71da0bc7c88c2
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Jul 9 13:18:08 2026 -0700
Fix printf format size error on macOS (PRIi64 won't format a size_t)
Use %zu, specified to format whatever a size_t is on the platform.
diff --git a/libgnucash/engine/qofid.cpp b/libgnucash/engine/qofid.cpp
index 364ae44f82..79fee2300b 100644
--- a/libgnucash/engine/qofid.cpp
+++ b/libgnucash/engine/qofid.cpp
@@ -266,7 +266,7 @@ qof_collection_foreach_sorted (const QofCollection *col, QofInstanceForeachCB cb
g_return_if_fail (col);
g_return_if_fail (cb_func);
- PINFO("Hash Table size of %s before is %" PRIi64, col->e_type, col->guid_entity_map.size());
+ PINFO("Hash Table size of %s before is %zu", col->e_type, col->guid_entity_map.size());
std::vector<QofInstance*> entries (col->guid_entity_map.size());
std::transform (col->guid_entity_map.cbegin(), col->guid_entity_map.cend(),
@@ -277,7 +277,7 @@ qof_collection_foreach_sorted (const QofCollection *col, QofInstanceForeachCB cb
std::for_each (entries.cbegin(), entries.cend(),
[&](auto ent) { cb_func (ent, user_data); });
- PINFO("Hash Table size of %s after is %" PRIi64, col->e_type, col->guid_entity_map.size());
+ PINFO("Hash Table size of %s after is %zu", col->e_type, col->guid_entity_map.size());
}
void
Summary of changes:
libgnucash/engine/qofid.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
More information about the gnucash-changes
mailing list