From: Dan Carpenter <dan.carpenter@oracle.com>
To: walter harms <wharms@bfs.de>
Cc: Amit Shah <amit.shah@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
kernel-janitors@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
virtualization@lists.linux-foundation.org
Subject: Re: [patch v2] virtio_console: silence a static checker warning
Date: Fri, 08 May 2015 12:18:45 +0000 [thread overview]
Message-ID: <20150508121844.GE16501@mwanda> (raw)
In-Reply-To: <554C9A52.4030707@bfs.de>
On Fri, May 08, 2015 at 01:13:22PM +0200, walter harms wrote:
> The basic idea was to limit the space, having leading zeros is my idea because
> i found this more convenient in the past. Using something like "%3u" will give
> static checkers a chance to detect the required max. space.
How are you calculating the %3?
The max for "id" is currently 31. To be honest, I'm not certain the max
for ->index. It's something in qemu but I'm not sure what. Who is
going to keep it updated?
The %3 is sort of meaningless. The lower levels of the code just ignore
it don't they?
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: walter harms <wharms@bfs.de>
Cc: Amit Shah <amit.shah@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
kernel-janitors@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
virtualization@lists.linux-foundation.org
Subject: Re: [patch v2] virtio_console: silence a static checker warning
Date: Fri, 8 May 2015 15:18:45 +0300 [thread overview]
Message-ID: <20150508121844.GE16501@mwanda> (raw)
In-Reply-To: <554C9A52.4030707@bfs.de>
On Fri, May 08, 2015 at 01:13:22PM +0200, walter harms wrote:
> The basic idea was to limit the space, having leading zeros is my idea because
> i found this more convenient in the past. Using something like "%3u" will give
> static checkers a chance to detect the required max. space.
How are you calculating the %3?
The max for "id" is currently 31. To be honest, I'm not certain the max
for ->index. It's something in qemu but I'm not sure what. Who is
going to keep it updated?
The %3 is sort of meaningless. The lower levels of the code just ignore
it don't they?
regards,
dan carpenter
next prev parent reply other threads:[~2015-05-08 12:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 6:19 [patch] virtio_console: use snprintf() for safety Dan Carpenter
2015-05-08 6:31 ` Amit Shah
2015-05-08 6:43 ` Amit Shah
2015-05-08 9:16 ` [patch v2] virtio_console: silence a static checker warning Dan Carpenter
2015-05-08 9:16 ` Dan Carpenter
2015-05-08 9:29 ` Amit Shah
2015-05-08 9:41 ` Amit Shah
2015-05-08 9:30 ` walter harms
2015-05-08 9:30 ` walter harms
2015-05-08 9:47 ` Dan Carpenter
2015-05-08 9:56 ` Amit Shah
2015-05-08 9:47 ` Dan Carpenter
2015-05-08 9:56 ` Amit Shah
2015-05-08 11:13 ` walter harms
2015-05-08 11:13 ` walter harms
2015-05-08 12:18 ` Dan Carpenter [this message]
2015-05-08 12:18 ` 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=20150508121844.GE16501@mwanda \
--to=dan.carpenter@oracle.com \
--cc=amit.shah@redhat.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=wharms@bfs.de \
/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.