From ebefefd45ffc9dea9d8d24c49e9e39845afdaec4 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Mon, 6 Apr 2020 19:30:51 -0400 Subject: [PATCH] codacy: fix %d in string requires 'int' but argument is 'unsigned int'. in a few different files Signed-off-by: Robin Getz --- tests/iio_adi_xflow_check.c | 2 +- tests/iio_attr.c | 2 +- tests/iio_info.c | 4 ++-- tests/iio_readdev.c | 2 +- tests/iio_writedev.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/iio_adi_xflow_check.c b/tests/iio_adi_xflow_check.c index ee9aeea5c..b9867601e 100644 --- a/tests/iio_adi_xflow_check.c +++ b/tests/iio_adi_xflow_check.c @@ -194,7 +194,7 @@ static struct iio_context *scan(void) fprintf(stderr, "Multiple contexts found. Please select one using --uri:\n"); for (i = 0; i < (size_t) ret; i++) { - fprintf(stderr, "\t%d: %s [%s]\n", i, + fprintf(stderr, "\t%u: %s [%s]\n", i, iio_context_info_get_description(info[i]), iio_context_info_get_uri(info[i])); } diff --git a/tests/iio_attr.c b/tests/iio_attr.c index cec667ce4..d751ed50e 100644 --- a/tests/iio_attr.c +++ b/tests/iio_attr.c @@ -156,7 +156,7 @@ static struct iio_context * autodetect_context(bool gen_code) } else { fprintf(stderr, "Multiple contexts found. Please select one using --uri:\n"); for (i = 0; i < (size_t) ret; i++) { - fprintf(stderr, "\t%d: %s [%s]\n", + fprintf(stderr, "\t%u: %s [%s]\n", i, iio_context_info_get_description(info[i]), iio_context_info_get_uri(info[i])); } diff --git a/tests/iio_info.c b/tests/iio_info.c index 3222d310b..da06ab947 100644 --- a/tests/iio_info.c +++ b/tests/iio_info.c @@ -120,7 +120,7 @@ static void scan(void) printf("Available contexts:\n"); for (i = 0; i < (size_t) ret; i++) { - printf("\t%d: %s [%s]\n", i, + printf("\t%u: %s [%s]\n", i, iio_context_info_get_description(info[i]), iio_context_info_get_uri(info[i])); } @@ -166,7 +166,7 @@ static struct iio_context * autodetect_context(void) fprintf(stderr, "Multiple contexts found. Please select one using --uri:\n"); for (i = 0; i < (size_t) ret; i++) { - fprintf(stderr, "\t%d: %s [%s]\n", i, + fprintf(stderr, "\t%u: %s [%s]\n", i, iio_context_info_get_description(info[i]), iio_context_info_get_uri(info[i])); } diff --git a/tests/iio_readdev.c b/tests/iio_readdev.c index fbe79f844..a61fb308e 100644 --- a/tests/iio_readdev.c +++ b/tests/iio_readdev.c @@ -236,7 +236,7 @@ static struct iio_context *scan(void) fprintf(stderr, "Multiple contexts found. Please select one using --uri:\n"); for (i = 0; i < (size_t) ret; i++) { - fprintf(stderr, "\t%d: %s [%s]\n", i, + fprintf(stderr, "\t%u: %s [%s]\n", i, iio_context_info_get_description(info[i]), iio_context_info_get_uri(info[i])); } diff --git a/tests/iio_writedev.c b/tests/iio_writedev.c index 7e27fa431..de6c6ab5f 100644 --- a/tests/iio_writedev.c +++ b/tests/iio_writedev.c @@ -245,7 +245,7 @@ static struct iio_context *scan(void) fprintf(stderr, "Multiple contexts found. Please select one using --uri:\n"); for (i = 0; i < (size_t) ret; i++) { - fprintf(stderr, "\t%d: %s [%s]\n", i, + fprintf(stderr, "\t%u: %s [%s]\n", i, iio_context_info_get_description(info[i]), iio_context_info_get_uri(info[i])); }