All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aurélien Aptel" <aaptel@suse.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-sparse@vger.kernel.org
Subject: Re: check idea: warn when mixing signedness in ?: operator (got bitten by this recently)
Date: Wed, 21 Apr 2021 15:43:03 +0200	[thread overview]
Message-ID: <87eef3zrbs.fsf@suse.com> (raw)
In-Reply-To: <20210421103036.GG1981@kadam>

Dan Carpenter <dan.carpenter@oracle.com> writes:
> Yeah.  It finds it.  :)  It works pretty well.  The temptation is to
> ignore left shifts.  Otherwise I think I will just push this.

Great, glad to hear! I didn't check everything but these ones look like
real bugs (samples but still):

> samples/kfifo/bytestream-example.c:126 fifo_write() warn: check sign expansion for 'ret'
> samples/kfifo/bytestream-example.c:142 fifo_read() warn: check sign expansion for 'ret'
> samples/kfifo/record-example.c:133 fifo_write() warn: check sign expansion for 'ret'
> samples/kfifo/record-example.c:149 fifo_read() warn: check sign expansion for 'ret'
> samples/kfifo/inttype-example.c:119 fifo_write() warn: check sign expansion for 'ret'
> samples/kfifo/inttype-example.c:135 fifo_read() warn: check sign expansion for 'ret'

Cheers,
-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)


  reply	other threads:[~2021-04-21 13:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19 10:21 check idea: warn when mixing signedness in ?: operator (got bitten by this recently) Aurélien Aptel
2021-04-19 22:00 ` Luc Van Oostenryck
2021-04-20 12:16 ` Dan Carpenter
2021-04-20 12:44   ` Aurélien Aptel
2021-04-21 10:30     ` Dan Carpenter
2021-04-21 13:43       ` Aurélien Aptel [this message]
2021-04-21 13:46         ` Dan Carpenter

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=87eef3zrbs.fsf@suse.com \
    --to=aaptel@suse.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-sparse@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.