Re: [PATCH] ext4: use strlcpy() instead of strncpy()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux