Skip to contentSkip to conversation

lib/tst_safe_posix_ipc: Use %zu to format size_t

PATCH In review Richard Palethorpe via ltp 3 participants 3 messages Feb 14, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib/tst_safe_posix_ipc: Use %zu to format size_t

Prevents compiler warning on 32bit

---
 include/tst_safe_posix_ipc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/tst_safe_posix_ipc.h +1 -1
index 2d3d0928f..e7892f2af 100644
@@ -121,7 +121,7 @@ static inline int safe_mq_send(const char *file, const int lineno,
 
 	if (rval == -1) {
 		tst_brk_(file, lineno, TBROK | TERRNO,
-			"mq_send(%d,%s,%lu,%d) failed", mqdes, msg_ptr,
+			"mq_send(%d,%s,%zu,%d) failed", mqdes, msg_ptr,
 			msg_len, msg_prio);
 	}
 
Signature · 5 lines
2.39.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by on v1 1/1
#1 lore raw

Hi!
This would classify as obviously correct, so you could have just pushed the patch and then send it as FYI to the list with [COMMITED] in the subject.

Anyways:

Quoted 23 lines
---
 include/tst_safe_posix_ipc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/tst_safe_posix_ipc.h +1 -1
index 2d3d0928f..e7892f2af 100644
@@ -121,7 +121,7 @@ static inline int safe_mq_send(const char *file, const int lineno,
 
 	if (rval == -1) {
 		tst_brk_(file, lineno, TBROK | TERRNO,
-			"mq_send(%d,%s,%lu,%d) failed", mqdes, msg_ptr,
+			"mq_send(%d,%s,%zu,%d) failed", mqdes, msg_ptr,
 			msg_len, msg_prio);
 	}
 
Signature · 5 lines
2.39.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw

Hi Richie, Cyril,

thanks, merged!

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp