From 11a52750d3c67872e395c095125366cc57f4752d Mon Sep 17 00:00:00 2001 From: Inaky Perez-Gonzalez Date: Tue, 22 Nov 2016 10:46:11 -0800 Subject: [PATCH] libc: remove useless code in _prf() Coverity reported a block of deadcode in _prf() that seems to be a leftover carcass from a previous time. Replaced with a comment in case someone decides it was needed back. Change-Id: Id97e84f3279f807e6188371f27f6af157e6d5038 Coverity-ID: 131631 Signed-off-by: Inaky Perez-Gonzalez --- lib/libc/minimal/source/stdout/prf.c | 31 ++++++++-------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/lib/libc/minimal/source/stdout/prf.c b/lib/libc/minimal/source/stdout/prf.c index db351a41029..703f18b0639 100644 --- a/lib/libc/minimal/source/stdout/prf.c +++ b/lib/libc/minimal/source/stdout/prf.c @@ -520,28 +520,15 @@ int _prf(int (*func)(), void *dest, char *format, va_list vargs) if (strchr("hlLz", c) != NULL) { i = c; c = *format++; - switch (i) { - case 'h': - if (strchr("diouxX", c) == NULL) - break; - break; - - case 'l': - if (strchr("diouxX", c) == NULL) - break; - break; - - case 'L': - if (strchr("eEfgG", c) == NULL) - break; - break; - - case 'z': - if (strchr("diouxX", c) == NULL) - break; - break; - - } + /* + * Here there was a switch() block + * which was doing nothing useful, I + * am still puzzled at why it was left + * over. Maybe before it contained + * stuff that was needed, but in its + * current form, it was being + * optimized out. + */ } need_justifying = false;