mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
grlib/uart/apbuart_cons.c: Correct comparisons of different signedness
The GCC warning -Wsign-compare flagged these instances of comparing signed and unsigned types. A common pair was size_t and int.
This commit is contained in:
@@ -520,7 +520,7 @@ static int read_task(rtems_termios_device_context *base)
|
||||
rtems_interrupt_lock_context lock_context;
|
||||
struct apbuart_priv *uart = base_get_priv(base);
|
||||
apbuart *regs = uart->regs;
|
||||
int cnt;
|
||||
size_t cnt;
|
||||
char buf[33];
|
||||
struct rtems_termios_tty *tty;
|
||||
uint32_t ctrl;
|
||||
@@ -683,7 +683,7 @@ static void write_polled(
|
||||
)
|
||||
{
|
||||
struct apbuart_priv *uart = base_get_priv(base);
|
||||
int nwrite = 0;
|
||||
size_t nwrite = 0;
|
||||
|
||||
while (nwrite < len) {
|
||||
apbuart_outbyte_polled(uart->regs, *buf++);
|
||||
@@ -699,7 +699,7 @@ static void write_interrupt(
|
||||
{
|
||||
struct apbuart_priv *uart = base_get_priv(base);
|
||||
apbuart *regs = uart->regs;
|
||||
int sending;
|
||||
size_t sending;
|
||||
unsigned int ctrl;
|
||||
|
||||
ctrl = grlib_load_32(®s->ctrl);
|
||||
@@ -752,7 +752,7 @@ static void apbuart_cons_isr(void *arg)
|
||||
apbuart *regs = uart->regs;
|
||||
unsigned int status;
|
||||
char buf[33];
|
||||
int cnt;
|
||||
size_t cnt;
|
||||
|
||||
if (uart->mode == TERMIOS_TASK_DRIVEN) {
|
||||
if ((status = grlib_load_32(®s->status)) & APBUART_STATUS_DR) {
|
||||
|
||||
Reference in New Issue
Block a user