From 2a51824a54bc4ccc02b8b8d4ab8b02ff0cd5edfa Mon Sep 17 00:00:00 2001 From: Nick Connolly Date: Tue, 28 Sep 2021 12:05:50 +0100 Subject: [PATCH] lib/thread: Use PRIu64 for portability POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a portable way. Replace a reference to %lu to remove the assumption about the size of a long. Signed-off-by: Nick Connolly Change-Id: I622fd43e7acf2cb93d3ba4ba9e9367e6dd064a74 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9663 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk --- lib/thread/thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/thread/thread.c b/lib/thread/thread.c index ed12b0618..c7218939a 100644 --- a/lib/thread/thread.c +++ b/lib/thread/thread.c @@ -1554,8 +1554,8 @@ static void wrong_thread(const char *func, const char *name, struct spdk_thread *thread, struct spdk_thread *curthread) { - SPDK_ERRLOG("%s(%s) called from wrong thread %s:%lu (should be " - "%s:%lu)\n", func, name, curthread->name, curthread->id, + SPDK_ERRLOG("%s(%s) called from wrong thread %s:%" PRIu64 " (should be " + "%s:%" PRIu64 ")\n", func, name, curthread->name, curthread->id, thread->name, thread->id); assert(false); }