Signed-off-by: Rasmus Villemoes <rv@xxxxxxxxxxxxxxxxxx> --- check_kernel_printf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/check_kernel_printf.c b/check_kernel_printf.c index fb8d3049..87c6744a 100644 --- a/check_kernel_printf.c +++ b/check_kernel_printf.c @@ -1011,9 +1011,11 @@ do_check_printf_call(const char *caller, const char *name, struct expression *ca if (spec.flags & SPECIAL && has_hex_prefix(orig_fmt, old_fmt)) sm_msg("warn: '%.2s' prefix is redundant when # flag is used", old_fmt-2); - if (is_integer_specifier(spec.type) && spec.base != 16 && has_hex_prefix(orig_fmt, old_fmt)) - sm_msg("warn: '%.2s' prefix is confusing together with '%.*s' specifier", - old_fmt-2, (int)(fmt-old_fmt), old_fmt); + if (is_integer_specifier(spec.type)) { + if (spec.base != 16 && has_hex_prefix(orig_fmt, old_fmt)) + sm_msg("warn: '%.2s' prefix is confusing together with '%.*s' specifier", + old_fmt-2, (int)(fmt-old_fmt), old_fmt); + } switch (spec.type) { /* case FORMAT_TYPE_NONE: */ -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe smatch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html