From: Jiri Slaby <jirislaby@kernel.org>
To: Ajay Garg <ajaygargnsit@gmail.com>,
gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com,
kernel@esmil.dk, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: paskripkin@gmail.com
Subject: Re: [PATCH v4] tty: vt: keyboard: add default switch-case, to handle smatch-warnings in method vt_do_kdgkb_ioctl
Date: Mon, 8 Nov 2021 08:03:23 +0100 [thread overview]
Message-ID: <3ab0e357-dbea-e5aa-49c0-d02b49d532dd@kernel.org> (raw)
In-Reply-To: <20211107031721.4734-1-ajaygargnsit@gmail.com>
On 07. 11. 21, 4:17, Ajay Garg wrote:
> smatch-kchecker gives the following warnings when run on keyboard.c :
>
> vt_do_kdgkb_ioctl() error: uninitialized symbol 'kbs'.
> vt_do_kdgkb_ioctl() error: uninitialized symbol 'ret'.
>
> This usually happens when switch has no default case and static
> analyzers and even sometimes compilers can’t prove that all possible
> values are covered.
>
>
> Thus, the default switch-case has been added, which sets the values
> for the two variables :
Just to shut up random static analyzers? Please don't.
--
js
suse labs
next prev parent reply other threads:[~2021-11-08 7:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-07 3:17 [PATCH v4] tty: vt: keyboard: add default switch-case, to handle smatch-warnings in method vt_do_kdgkb_ioctl Ajay Garg
2021-11-08 7:03 ` Jiri Slaby [this message]
2021-11-08 8:36 ` Andy Shevchenko
2021-11-08 8:55 ` Ajay Garg
2021-11-08 9:41 ` Johan Hovold
2021-11-08 13:51 ` Ajay Garg
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=3ab0e357-dbea-e5aa-49c0-d02b49d532dd@kernel.org \
--to=jirislaby@kernel.org \
--cc=ajaygargnsit@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@esmil.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=paskripkin@gmail.com \
/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.