aboutsummaryrefslogtreecommitdiff
path: root/projects/cli-test
diff options
context:
space:
mode:
Diffstat (limited to 'projects/cli-test')
-rw-r--r--projects/cli-test/mgmt-cli.c6
-rw-r--r--projects/cli-test/mgmt-keystore.c2
-rw-r--r--projects/cli-test/test-fmc.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/projects/cli-test/mgmt-cli.c b/projects/cli-test/mgmt-cli.c
index eacb944..b3dbabf 100644
--- a/projects/cli-test/mgmt-cli.c
+++ b/projects/cli-test/mgmt-cli.c
@@ -58,8 +58,8 @@
#endif
typedef struct {
- int ridx;
- volatile int widx;
+ unsigned ridx;
+ unsigned widx;
mgmt_cli_dma_state_t rx_state;
uint8_t buf[CLI_UART_RECVBUF_SIZE];
} ringbuf_t;
@@ -109,7 +109,7 @@ static void uart_cli_print(struct cli_def *cli __attribute__ ((unused)), const c
static ssize_t uart_cli_read(struct cli_def *cli __attribute__ ((unused)), void *buf, size_t count)
{
- for (int i = 0; i < count; ++i) {
+ for (size_t i = 0; i < count; ++i) {
while (ringbuf_read_char(&uart_ringbuf, (uint8_t *)(buf + i)) == 0) {
}
}
diff --git a/projects/cli-test/mgmt-keystore.c b/projects/cli-test/mgmt-keystore.c
index 18447c8..bc2bc0c 100644
--- a/projects/cli-test/mgmt-keystore.c
+++ b/projects/cli-test/mgmt-keystore.c
@@ -263,7 +263,7 @@ static int show_keys(struct cli_def *cli, const char *title)
if (!done)
previous_uuid = uuids[sizeof(uuids)/sizeof(*uuids) - 1];
- for (int i = 0; i < n; i++) {
+ for (unsigned i = 0; i < n; i++) {
if ((status = hal_uuid_format(&uuids[i], key_name, sizeof(key_name))) != LIBHAL_OK) {
cli_print(cli, "Could not convert key name: %s",
diff --git a/projects/cli-test/test-fmc.c b/projects/cli-test/test-fmc.c
index b393dac..a1d6eea 100644
--- a/projects/cli-test/test-fmc.c
+++ b/projects/cli-test/test-fmc.c
@@ -105,7 +105,7 @@ int test_fpga_data_bus(struct cli_def *cli, uint32_t test_rounds)
HAL_RNG_Init(&rng_inst);
/* run some rounds of data bus test */
- for (c = 0; c < test_rounds; c++) {
+ for (c = 0; c < (int)test_rounds; c++) {
data_diff = 0;
/* try to generate "random" number */
hal_result = HAL_RNG_GenerateRandomNumber(&rng_inst, &rnd);
@@ -163,7 +163,7 @@ int test_fpga_address_bus(struct cli_def *cli, uint32_t test_rounds)
HAL_RNG_Init(&rng_inst);
/* run some rounds of address bus test */
- for (c = 0; c < test_rounds; c++) {
+ for (c = 0; c < (int)test_rounds; c++) {
addr_diff = 0;
/* try to generate "random" number */
hal_result = HAL_RNG_GenerateRandomNumber(&rng_inst, &addr);