From e4d6035a9ba50f28eeba616c29b0799d283083c3 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 9 Jun 2020 00:56:37 +0700 Subject: 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 --- src/target/firmware/apps/rssi/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- cgit v1.2.3