From 4026cce22d330d3b9c4b218dd2e19d4f60412e05 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Wed, 11 Oct 2017 17:32:33 -0400 Subject: Cleanup: signed/unsigned mismatches, mostly in loop counters --- projects/cli-test/mgmt-cli.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'projects/cli-test/mgmt-cli.c') 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) { } } -- cgit v1.2.3