Re: [PATCH lksctp-tools] nagle_snd: silence false-positive compiler warning

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

 



On Wed, Aug 01, 2018 at 01:33:04PM -0300, Marcelo Ricardo Leitner wrote:
> I'm getting:
> nagle_snd.c: In function ‘main’:
> nagle_snd.c:275:3: warning: ‘strncpy’ output truncated before terminating nul copying 10 bytes from a string of the same length [-Wstringop-truncation]
>    strncpy(message+i, "1234567890", 10);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Turns out the code is doing that on purpose. To silence it, lets use
> memcpy() instead.

Applied.



[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux