smatch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rasmus Villemoes <rv@rasmusvillemoes.dk>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: smatch@vger.kernel.org, "Tobin C. Harding" <me@tobin.cc>
Subject: Re: [PATCH 5/5] check_kernel_printf.c: warn about "%lx", (long)ptr
Date: Fri, 27 Oct 2017 22:53:05 +0200	[thread overview]
Message-ID: <CAKwiHFjW_G0huO36OXCHrycSQ0XOKJWpXmkEWQyF3MOp4pek2A@mail.gmail.com> (raw)
In-Reply-To: <20171026115107.ytspxmdqahicwrom@mwanda>

On 26 October 2017 at 13:51, Dan Carpenter <dan.carpenter@oracle.com> 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

      reply	other threads:[~2017-10-27 20:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25 19:25 [PATCH 0/5] check_kernel_printf stuff Rasmus Villemoes
2017-10-25 19:25 ` [PATCH 1/5] check_kernel_printf.c: use get_real_base_type in typedef_lookup Rasmus Villemoes
2017-10-25 19:25 ` [PATCH 2/5] check_kernel_printf.c: remove copy-pastoed variable Rasmus Villemoes
2017-10-25 19:25 ` [PATCH 3/5] check_kernel_printf.c: check %pOF argument is struct device_node* Rasmus Villemoes
2017-10-25 19:25 ` [PATCH 4/5] check_kernel_printf.c: prepare for more tests for integer specifiers Rasmus Villemoes
2017-10-25 19:25 ` [PATCH 5/5] check_kernel_printf.c: warn about "%lx", (long)ptr Rasmus Villemoes
2017-10-26 10:48   ` Dan Carpenter
2017-10-26 10:54     ` Rasmus Villemoes
2017-10-26 11:10       ` Dan Carpenter
2017-10-26 11:17         ` Dan Carpenter
2017-10-26 11:23         ` Rasmus Villemoes
2017-10-26 11:51           ` Dan Carpenter
2017-10-27 20:53             ` Rasmus Villemoes [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKwiHFjW_G0huO36OXCHrycSQ0XOKJWpXmkEWQyF3MOp4pek2A@mail.gmail.com \
    --to=rv@rasmusvillemoes.dk \
    --cc=dan.carpenter@oracle.com \
    --cc=me@tobin.cc \
    --cc=smatch@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).