gri3-wm/i3bar/src
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
..
child.c Add relative coordinates in JSON for i3bar click events (fixes #2767) 2017-12-20 22:51:14 +05:30
config.c Merge pull request #3246 from orestisf1993/bar-modifier-3234 2018-04-17 13:13:18 +02:00
ipc.c Replace strncpy call with memcpy when result is not NUL-terminated 2018-05-08 17:05:46 +03:00
main.c Add an i3bar flag: --verbose 2018-04-13 23:09:44 +08:00
mode.c Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
outputs.c i3bar: free output data structures 2017-12-03 20:25:34 +02:00
parse_json_header.c Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
workspaces.c Add strip_workspace_name 2018-03-11 12:17:42 +08:00
xcb.c Replace strncpy call with memcpy when result is not NUL-terminated 2018-05-08 17:05:46 +03:00