gri3-wm/i3bar
Orestis Floros f4981f97bc
Replace strncpy call with memcpy when result is not NUL-terminated
This fixes a new warning from GCC 8.1, -Wstringop-truncation:
https://gcc.gnu.org/gcc-8/changes.html
https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#index-Wstringop-truncation

Replacing with memcpy is what gcc suggests:
> As another example, the following call to strncpy results in copying
> to d just the characters preceding the terminating NUL, without
> appending the NUL to the end. Assuming the result of strncpy is
> necessarily a NUL-terminated string is a common mistake, and so the
> call is diagnosed. To avoid the warning when the result is not
> expected to be NUL-terminated, call memcpy instead.
>    void copy (char *d, const char *s)
>    {
>      strncpy (d, s, strlen (s));
>    }
2018-05-08 17:05:46 +03:00
..
include i3bar: make modifier behave like floating_modifier 2018-04-17 02:00:03 +03:00
src Replace strncpy call with memcpy when result is not NUL-terminated 2018-05-08 17:05:46 +03:00
.gitignore Mention the color-options in the manpage 2010-11-04 12:43:41 +01:00
LICENSE Update i3bar LICENSE to conform to other LICENSE files. (#2284) 2016-04-10 04:15:49 -07:00