diff mbox series

[BlueZ] monitor: fix usage of size_t %z formater

Message ID 20220629191943.17326-1-brian.gix@intel.com
State New
Headers show
Series [BlueZ] monitor: fix usage of size_t %z formater | expand

Commit Message

Brian Gix June 29, 2022, 7:19 p.m. UTC
Some versions of GCC use strict typing for the %z formater, so passing
an argument of type uint64_t instead of size_t throws an error.
---
 monitor/l2cap.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/monitor/l2cap.h b/monitor/l2cap.h
index 00a8ffbbd..86113e59d 100644
--- a/monitor/l2cap.h
+++ b/monitor/l2cap.h
@@ -291,7 +291,7 @@  static inline bool l2cap_frame_print_be64(struct l2cap_frame *frame,
 		return false;
 	}
 
-	print_field("%s: 0x%zx", label, u64);
+	print_field("%s: 0x%zx", label, (size_t)u64);
 
 	return true;
 }
@@ -320,7 +320,7 @@  static inline bool l2cap_frame_print_le64(struct l2cap_frame *frame,
 		return false;
 	}
 
-	print_field("%s: 0x%zx", label, u64);
+	print_field("%s: 0x%zx", label, (size_t)u64);
 
 	return true;
 }