aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnie Tallund <annie.tallund@arm.com>2021-08-09 14:26:12 +0200
committerKristofer Jonsson <kristofer.jonsson@arm.com>2021-10-05 11:44:36 +0000
commite25a89dec1cf990f3168dbd6c565e3b0d51cb151 (patch)
tree305a772e26acf9da50d46b91814b65fe67ebc066
parent0e9dbfeb8f115424799fed694be30da56293eb30 (diff)
downloadethos-u-core-platform-e25a89dec1cf990f3168dbd6c565e3b0d51cb151.tar.gz
add fallthrough attribute to prevent fallthorugh warning in uart, corstone-300
Change-Id: I207271d41a8dfa899ac5f53842790c4206657fe5
-rw-r--r--targets/corstone-300/uart.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/targets/corstone-300/uart.c b/targets/corstone-300/uart.c
index cba54d8..bd7dddf 100644
--- a/targets/corstone-300/uart.c
+++ b/targets/corstone-300/uart.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020 Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2021 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -131,6 +131,7 @@ unsigned int uart_getline(char *lp, unsigned int len) {
lp++; /* increment line pointer */
cnt++; /* and count */
c = LF;
+ __attribute__((fallthrough)); /* intentional fallthrough */
default:
uart_putc(*lp = c); /* echo and store character */
fflush(stdout);