linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rt-tests, cyclictest - fix printf format for 32 bit systems
@ 2011-09-28 22:18 Frank Rowand
  2011-09-29  7:35 ` Uwe Kleine-König
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Rowand @ 2011-09-28 22:18 UTC (permalink / raw)
  To: Clark Williams, linux-rt-users


The printf() format for a uint64_t is %l on a 64 bit system and %ll on
a 32 bit system.  Use the ugly but portable format descriptor.

Signed-off-by: Frank Rowand <frank.rowand@am.sony.com>
---
 src/cyclictest/cyclictest.c |    3 	2 +	1 -	0 !
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: b/src/cyclictest/cyclictest.c
===================================================================
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -24,6 +24,7 @@
 #include <time.h>
 #include <errno.h>
 #include <limits.h>
+#include <inttypes.h>
 #include <linux/unistd.h>
 
 #include <sys/prctl.h>
@@ -1561,7 +1562,7 @@ int main(int argc, char **argv)
 		print_tids(parameters, num_threads);
 		if (break_thread_id) {
 			printf("# Break thread: %d\n", break_thread_id);
-			printf("# Break value: %lu\n", break_thread_value);
+			printf("# Break value: %" PRIu64 "\n", break_thread_value);
 		}
 	}
 	


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-29  7:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-28 22:18 [PATCH] rt-tests, cyclictest - fix printf format for 32 bit systems Frank Rowand
2011-09-29  7:35 ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).