[Skiboot] [PATCH 1/3] external/pflash: Fix ccpcheck warnings in progress.c

Cyril Bur cyril.bur at au1.ibm.com
Tue Oct 11 18:51:20 AEDT 2016


Warnings in progress.c are not critical but warn about %d being used in printf
format string when the parameter passed is unsigned.

Trivial fixup which should silence the warnings.

Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
---
 external/pflash/progress.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/external/pflash/progress.c b/external/pflash/progress.c
index 1f98502..4012020 100644
--- a/external/pflash/progress.c
+++ b/external/pflash/progress.c
@@ -46,7 +46,7 @@ void progress_tick(unsigned long cur)
 		printf("=");
 	for (; i < PROGRESS_CHARS; i++)
 		printf(" ");
-	printf("] %d%%", pcent);
+	printf("] %u%%", pcent);
 
 	sec = now.tv_sec - progress_start.tv_sec;
 	if (sec >= 5 && pcent > 0) {
@@ -61,9 +61,9 @@ void progress_tick(unsigned long cur)
 			rem_sec = progress_prevsec;
 		progress_prevsec = rem_sec;
 		if (rem_sec < 60)
-			printf(" ETA:%ds     ", rem_sec);
+			printf(" ETA:%us     ", rem_sec);
 		else {
-			printf(" ETA:%d:%02d:%02d ",
+			printf(" ETA:%u:%02d:%02u ",
 				rem_sec / 3600,
 				(rem_sec / 60) % 60,
 				rem_sec % 60);
-- 
2.10.0



More information about the Skiboot mailing list