diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-10-31 04:17:28 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-10-31 04:18:58 -0400 |
commit | 5b3c2b9f3be1df7304302e3e73bea42e06be43a6 (patch) | |
tree | 09e3b0bfc092643aa3596a15bd0602242ad55330 /sim/erc32 | |
parent | 4ab6404b1c5798155640edf4bb207c8d1de37b5d (diff) | |
download | gdb-5b3c2b9f3be1df7304302e3e73bea42e06be43a6.zip gdb-5b3c2b9f3be1df7304302e3e73bea42e06be43a6.tar.gz gdb-5b3c2b9f3be1df7304302e3e73bea42e06be43a6.tar.bz2 |
sim: erc32: fix a few more build warnings
Tweak the if indentation & brace style to avoid ambiguous warnings.
Add ATTRIBUTE_UNUSED to UART functions that aren't used when FAST_UART
is defined (which is the default).
Diffstat (limited to 'sim/erc32')
-rw-r--r-- | sim/erc32/erc32.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sim/erc32/erc32.c b/sim/erc32/erc32.c index 68136e4..b1c079e 100644 --- a/sim/erc32/erc32.c +++ b/sim/erc32/erc32.c @@ -879,7 +879,7 @@ mec_write(uint32 addr, uint32 data) case MEC_ERSR: /* 0xB0 */ if (mec_tcr & 0x100000) - if (data & 0xFFFFEFC0) mecparerror(); + if (data & 0xFFFFEFC0) mecparerror(); mec_ersr = data & 0x103f; break; @@ -971,7 +971,7 @@ port_init(void) f1out = stdout; f2out = NULL; } - if (uart_dev1[0] != 0) + if (uart_dev1[0] != 0) { if ((fd1 = open(uart_dev1, O_RDWR | O_NONBLOCK)) < 0) { printf("Warning, couldn't open output device %s\n", uart_dev1); } else { @@ -981,6 +981,7 @@ port_init(void) setbuf(f1out, NULL); f1open = 1; } + } if (f1in) ifd1 = fileno(f1in); if (ifd1 == 0) { if (sis_verbose) @@ -1002,7 +1003,7 @@ port_init(void) if (!dumbio && ofd1 == 1) setbuf(f1out, NULL); } - if (uart_dev2[0] != 0) + if (uart_dev2[0] != 0) { if ((fd2 = open(uart_dev2, O_RDWR | O_NONBLOCK)) < 0) { printf("Warning, couldn't open output device %s\n", uart_dev2); } else { @@ -1012,6 +1013,7 @@ port_init(void) setbuf(f2out, NULL); f2open = 1; } + } if (f2in) ifd2 = fileno(f2in); if (ifd2 == 0) { if (sis_verbose) @@ -1241,8 +1243,7 @@ flush_uart(void) wnumb -= fwrite(wbufb, 1, wnumb, f2out); } - - +ATTRIBUTE_UNUSED static void uarta_tx(void) { @@ -1258,6 +1259,7 @@ uarta_tx(void) mec_irq(4); } +ATTRIBUTE_UNUSED static void uartb_tx(void) { @@ -1272,6 +1274,7 @@ uartb_tx(void) mec_irq(5); } +ATTRIBUTE_UNUSED static void uart_rx(void *arg) { |