From 3dac27dcfc5597af38a8ca57a8091000b1530a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Mon, 6 May 2024 11:42:46 +0200 Subject: [PATCH] Fix mainview.c warning on gcc compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Space after printf % character does make sense only when the value can be negative. If it is always positive, the space can be before the number in all cases. GCC warns about this, this change fixes it. This fixes following warning: mainview.c:596:38: warning: ' ' flag used with ā€˜%uā€™ gnu_printf format [-Wformat=] 596 | wprintw(miscview, "\nCycles :% 10u\n", clocks); --- mainview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mainview.c b/mainview.c index c087a7b..ff243d0 100644 --- a/mainview.c +++ b/mainview.c @@ -593,7 +593,7 @@ void mainview_update(struct em8051 *aCPU) werase(miscview); - wprintw(miscview, "\nCycles :% 10u\n", clocks); + wprintw(miscview, "\nCycles : %10u\n", clocks); wprintw(miscview, "Time :% 14.3fms\n", 1000.0f * clocks * (1.0f/opt_clock_hz)); wprintw(miscview, "HW : Super8051 @%0.1fMHz\n", opt_clock_hz / (1000*1000.0f));