From: Theodore Ts'o <tytso@mit.edu>
To: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Cc: Jan Kara <jack@suse.cz>,
adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org,
arnd@arndb.de
Subject: Re: [PATCH] ext4: use strlcpy() instead of strncpy()
Date: Tue, 9 Jan 2018 15:20:03 -0500 [thread overview]
Message-ID: <20180109202003.GC5389@thunk.org> (raw)
In-Reply-To: <eae3c8fd-d778-fa65-4609-5159a1a3b405@huawei.com>
On Tue, Jan 09, 2018 at 07:14:36PM +0800, Xiongfeng Wang wrote:
>
> Sorry, I didn't notice how s_last_error_func is used before.
> We do waste one character if we use strlcpy() instead of strncpy().
> We can't use memcpy() either. But I can't figure out a better way to avoid
> this warning.
Compain to the GCC developers? Create scripts that filter out crap?
What's important is code correctness, not eliminating warnings,
especially if the warnings are bogus. Sacrificing code performance or
correctness just for the sake of silencing warnings is just silly....
About all I'm willing to do here is to take a patch which adds a
comment saying, "ignore bogus GCC warning on this line".
- Ted
next prev parent reply other threads:[~2018-01-09 20:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 8:58 [PATCH] ext4: use strlcpy() instead of strncpy() Xiongfeng Wang
2018-01-09 10:06 ` Jan Kara
2018-01-09 11:14 ` Xiongfeng Wang
2018-01-09 20:20 ` Theodore Ts'o [this message]
2018-01-10 21:30 ` Arnd Bergmann
2018-01-10 23:01 ` Theodore Ts'o
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=20180109202003.GC5389@thunk.org \
--to=tytso@mit.edu \
--cc=adilger.kernel@dilger.ca \
--cc=arnd@arndb.de \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=wangxiongfeng2@huawei.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.