[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180109202003.GC5389@thunk.org>
Date: Tue, 9 Jan 2018 15:20:03 -0500
From: Theodore Ts'o <tytso@....edu>
To: Xiongfeng Wang <wangxiongfeng2@...wei.com>
Cc: Jan Kara <jack@...e.cz>, adilger.kernel@...ger.ca,
linux-ext4@...r.kernel.org, arnd@...db.de
Subject: Re: [PATCH] ext4: use strlcpy() instead of strncpy()
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
Powered by blists - more mailing lists