Diff between 2013f75493f04fb649f059371484e5113c9ad71e and bc7e20a107b29ebc8f8ebbe5aef2fd6ae5aa7949

Changed Files

File Additions Deletions Status
android/client/if-audio.c +2 -2 modified
android/client/if-main.h +4 -3 modified
android/client/tabcompletion.c +5 -6 modified

Full Patch

diff --git a/android/client/if-audio.c b/android/client/if-audio.c
index 5ab11a6..ce9e534 100644
--- a/android/client/if-audio.c
+++ b/android/client/if-audio.c
@@ -323,7 +323,7 @@ static void open_output_stream_p(int argc, const char **argv)
 	if (buffer_size == 0)
 		haltest_error("Invalid buffer size received!\n");
 	else
-		haltest_info("Using buffer size: %d\n", buffer_size);
+		haltest_info("Using buffer size: %zu\n", buffer_size);
 }
 
 static void close_output_stream_p(int argc, const char **argv)
@@ -408,7 +408,7 @@ static void get_buffer_size_p(int argc, const char **argv)
 	RETURN_IF_NULL(if_audio);
 	RETURN_IF_NULL(stream_out);
 
-	haltest_info("Current output buffer size: %d\n",
+	haltest_info("Current output buffer size: %zu\n",
 		stream_out->common.get_buffer_size(&stream_out->common));
 }
 
diff --git a/android/client/if-main.h b/android/client/if-main.h
index d82358e..b628464 100644
--- a/android/client/if-main.h
+++ b/android/client/if-main.h
@@ -124,9 +124,10 @@ struct method {
 	const char *help;
 };
 
-int haltest_error(const char *format, ...);
-int haltest_info(const char *format, ...);
-int haltest_warn(const char *format, ...);
+int haltest_error(const char *format, ...)
+					__attribute__((format(printf, 1, 2)));
+int haltest_info(const char *format, ...)__attribute__((format(printf, 1, 2)));
+int haltest_warn(const char *format, ...)__attribute__((format(printf, 1, 2)));
 
 /*
  * Enumerator for discovered devices, to be used as tab completion enum_func
diff --git a/android/client/tabcompletion.c b/android/client/tabcompletion.c
index f965620..aceea39 100644
--- a/android/client/tabcompletion.c
+++ b/android/client/tabcompletion.c
@@ -113,7 +113,7 @@ struct command_completion_args {
 	enum_func func; /* enumerating function */
 	void *user; /* argument to enumerating function */
 	short_help help; /* help function */
-	void *user_help; /* additional data (used by short_help) */
+	const char *user_help; /* additional data (used by short_help) */
 };
 
 /*
@@ -289,10 +289,9 @@ static void method_help(struct command_completion_args *args)
 
 	if (eb != NULL)
 		haltest_info("%s %-*s%.*s%s%.*s%s%s\n", args->arg->ntcopy,
-				arg1_size, arg1,
-				sb - (const char *) args->user_help,
-				args->user_help,
-				bold, eb - sb, sb, normal, eb);
+				arg1_size, arg1, (int) (sb - args->user_help),
+				args->user_help, bold, (int) (eb - sb),
+				sb, normal, eb);
 	else
 		haltest_info("%s %-*s%s\n", args->arg->ntcopy,
 			arg1_size, arg1, args->user_help);
@@ -336,7 +335,7 @@ static void param_completion(int argc, const split_arg_t *arg,
 	if (args.func != NULL) {
 		args.typed = argv[argc - 1];
 		args.help = method_help;
-		args.user_help = method ? (void *) method->help : NULL;
+		args.user_help = method ? method->help : NULL;
 
 		tab_completion(&args);
 	}