696c6f
--- crash-trace-command-2.0/trace.c.orig
696c6f
+++ crash-trace-command-2.0/trace.c
696c6f
@@ -15,6 +15,7 @@
696c6f
 #include <stdio.h>
696c6f
 #include <ctype.h>
696c6f
 #include <setjmp.h>
696c6f
+#include <stdlib.h>
696c6f
 
696c6f
 static int verbose = 0;
696c6f
 
696c6f
@@ -892,7 +893,7 @@ out_fail:
696c6f
 
696c6f
 static int ftrace_init_event_type(ulong call, struct event_type *aevent_type)
696c6f
 {
696c6f
-	ulong fields_head;
696c6f
+	ulong fields_head = 0;
696c6f
 
696c6f
 	if (ftrace_get_event_type_fields(call, &fields_head) < 0)
696c6f
 		return -1;
696c6f
@@ -1443,6 +1444,8 @@ static void ftrace_show(int argc, char *
696c6f
 	int fd;
696c6f
 	FILE *file;
696c6f
 	size_t ret;
696c6f
+	size_t nitems __attribute__ ((__unused__));
696c6f
+	char *unused __attribute__ ((__unused__));
696c6f
 
696c6f
 	/* check trace-cmd */
696c6f
 	if (env_trace_cmd)
696c6f
@@ -1465,7 +1468,7 @@ static void ftrace_show(int argc, char *
696c6f
 	}
696c6f
 
696c6f
 	/* dump trace.dat to the temp file */
696c6f
-	mktemp(tmp);
696c6f
+	unused = mktemp(tmp);
696c6f
 	fd = open(tmp, O_WRONLY | O_CREAT | O_TRUNC, 0644);
696c6f
 	if (trace_cmd_data_output(fd) < 0)
696c6f
 		goto out;
696c6f
@@ -1478,7 +1481,7 @@ static void ftrace_show(int argc, char *
696c6f
 		ret = fread(buf, 1, sizeof(buf), file);
696c6f
 		if (ret == 0)
696c6f
 			break;
696c6f
-		fwrite(buf, 1, ret, fp);
696c6f
+		nitems = fwrite(buf, 1, ret, fp);
696c6f
 	}
696c6f
 	pclose(file);
696c6f
 out: