tinyalsa: Fix debug info data type mismatch error and potential
risk of wild pointer
1 There are debug info data type mismatch in file of tinycap.c
/tinymix.c/tinypcminfo.c
2 There is a risk of wild pointer when abnormally abort
Test: mma, built and ran on device without errors
Bug: None
Change-Id: I7241a67229faf78d8741dc199e7b5799e4de3b10
diff --git a/tinymix.c b/tinymix.c
index 7b39892..fc62334 100644
--- a/tinymix.c
+++ b/tinymix.c
@@ -134,7 +134,7 @@
num_ctls = mixer_get_num_ctls(mixer);
- printf("Number of controls: %d\n", num_ctls);
+ printf("Number of controls: %u\n", num_ctls);
if (g_tabs_only)
printf("ctl\ttype\tnum\tname\tvalue");
@@ -372,7 +372,7 @@
/* Set multiple values */
if (num_values > num_ctl_values) {
fprintf(stderr,
- "Error: %d values given, but control only takes %d\n",
+ "Error: %u values given, but control only takes %u\n",
num_values, num_ctl_values);
return EINVAL;
}