Powered by Linux
Re: [PATCH 5/5] check_kernel_printf.c: warn about "%lx", (long)ptr — Semantic Matching Tool

Re: [PATCH 5/5] check_kernel_printf.c: warn about "%lx", (long)ptr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26 October 2017 at 13:51, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> I'm sort of surprised that Sparse does this:
>
> struct symbol *ssize_t_ctype = &int_ctype;
>
> I really thought it should have been &long_ctype instead...

It seems it used to be that, but it was changed 10 years ago
(5061de9). But there's various -mfoo options to tweak it.

>  Anyway,
> this patch should fix it.  I've pushed your first four patches.  If this
> patch is Ok, then resend me patch 5 and I'll push that as well.

Looks ok, I'll see if I can try it out. But now that I look in
smatch_type.c, using this get_binop_type() for EXPR_COMPARE is
definitely wrong, since the type of any ==, <=, >=, <, >, !=
expression is just plain int.

Rasmus
--
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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux