Browse code

common.c: get rid of a few warnings.

Xavier G authored on 23/08/2016 02:47:40
Showing 1 changed files
... ...
@@ -86,7 +86,7 @@ int main(int argc, char **argv, char **envp) {
86 86
 	array_display(array, count, "Before: ", "\n\n");
87 87
 
88 88
 	/* Look at our watch, do the work, look at our watch again: */
89
-	printf("=> About to sort %u items\n", count, diff.tv_sec, diff.tv_usec);
89
+	printf("=> About to sort %u items\n", count);
90 90
 	gettimeofday(&before_start, NULL);
91 91
 #ifdef ARRAY_SORT
92 92
 	array_sort(&array, count);
... ...
@@ -95,7 +95,7 @@ int main(int argc, char **argv, char **envp) {
95 95
 
96 96
 	/* Compute how much time the work took and display the results: */
97 97
 	timersub(&after_end, &before_start, &diff);
98
-	printf("<= Sorted %u items in %d.%06ds\n\n", count, diff.tv_sec, diff.tv_usec);
98
+	printf("<= Sorted %u items in %ld.%06lds\n\n", count, diff.tv_sec, diff.tv_usec);
99 99
 	array_display(array, count, "After: ", "\n");
100 100
 
101 101
 	return 0;