summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-06-09 00:56:37 +0700
committerlaforge <laforge@osmocom.org>2020-06-18 11:42:03 +0000
commite4d6035a9ba50f28eeba616c29b0799d283083c3 (patch)
treebd6bb9e936a4c6a27e178facc674db3fae3adf0c
parent55a63b17598023b8eb0f7f4a6407a65e2e10d174 (diff)
firmware/apps/rssi: enlarge text buffer in refresh_display()
This change fixes several warnings reported by GCC 10.1.0: apps/rssi/main.c:238:30: warning: 'sprintf' may write a terminating nul past the end of the destination apps/rssi/main.c:238:4: note: 'sprintf' output between 10 and 17 bytes into a destination of size 16 apps/rssi/main.c:413:26: warning: '.' directive writing 1 byte into a region of size between 0 and 9 apps/rssi/main.c:413:3: note: 'sprintf' output between 10 and 20 bytes into a destination of size 16 Change-Id: I7980727b78f7622d792d82170f73c90ac5770397
-rw-r--r--src/target/firmware/apps/rssi/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/firmware/apps/rssi/main.c b/src/target/firmware/apps/rssi/main.c
index e1378064..4b33ee39 100644
--- a/src/target/firmware/apps/rssi/main.c
+++ b/src/target/firmware/apps/rssi/main.c
@@ -170,7 +170,7 @@ static void print_display(char *text, int *y, int c)
static void refresh_display(void)
{
- char text[16];
+ char text[32];
int bat = battery_info.battery_percent;
fb_clear();