diff mbox series

[v2,1/9] kernel-shark: Fix the build for 32b systems

Message ID 20210428134730.187533-2-y.karadz@gmail.com (mailing list archive)
State Accepted
Commit 8c3a5c39a00e0f19cedf0ef635348d09434ab8da
Headers show
Series (Not so) Minor fixes toward KS 2.0 | expand

Commit Message

Yordan Karadzhov April 28, 2021, 1:47 p.m. UTC
All warnings and errors when building on 32bit Linux systems are fixed.

Reported-by: Alan Mikhak <amikhak@wirelessfabric.com>
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 src/KsSession.cpp        | 2 +-
 src/libkshark-configio.c | 2 +-
 src/libkshark-tepdata.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/src/KsSession.cpp b/src/KsSession.cpp
index 8d489f7..1e19a5f 100644
--- a/src/KsSession.cpp
+++ b/src/KsSession.cpp
@@ -587,7 +587,7 @@  void KsSession::saveDualMarker(KsDualMarkerSM *dm)
  */
 void KsSession::loadDualMarker(KsDualMarkerSM *dm, KsTraceGraph *graphs)
 {
-	uint64_t pos;
+	size_t pos;
 
 	dm->reset();
 	dm->setState(DualMarkerState::A);
diff --git a/src/libkshark-configio.c b/src/libkshark-configio.c
index 98098da..9a1ba60 100644
--- a/src/libkshark-configio.c
+++ b/src/libkshark-configio.c
@@ -567,7 +567,7 @@  static bool kshark_trace_file_from_json(const char **file, const char **name,
 	}
 
 	if (st.st_mtime != time) {
-		fprintf(stderr, "Timestamp mismatch! (%li!=%li)\nFile %s\n",
+		fprintf(stderr, "Timestamp mismatch! (%" PRIu64 "!=%li)\nFile %s\n",
 				time, st.st_mtime, file_str);
 		return false;
 	}
diff --git a/src/libkshark-tepdata.c b/src/libkshark-tepdata.c
index 4e76ef2..bc5babb 100644
--- a/src/libkshark-tepdata.c
+++ b/src/libkshark-tepdata.c
@@ -1025,7 +1025,7 @@  static char *tepdata_dump_entry(struct kshark_data_stream *stream,
 			free(info);
 		} else {
 			n = asprintf(&entry_str,
-				     "%i; %li; [UNKNOWN TASK]-%i; CPU %i; ; [UNKNOWN EVENT]; [NO INFO]; 0x%x",
+				     "%i; %" PRIu64 "; [UNKNOWN TASK]-%i; CPU %i; ; [UNKNOWN EVENT]; [NO INFO]; 0x%x",
 				     entry->stream_id,
 				     entry->ts,
 				     interface->get_pid(stream, entry),