mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 14:15:58 +01:00
Fix false positive -Wstringop-truncation
Fix false positive stringop-truncation warning/error with GCC 10 on s390x by indicating GCC to explicitly ignore this case, as it is clearly a false positive (NUL is set in the following line). This allow the compilation to succeed with -Werror on. Fixes: https://github.com/swaywm/wlroots/issues/2018
This commit is contained in:
parent
46d2f80c38
commit
d8a422575b
1 changed files with 3 additions and 0 deletions
|
@ -655,8 +655,11 @@ _XcursorAddPathElt (char *path, const char *elt, int len)
|
|||
elt++;
|
||||
len--;
|
||||
}
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
strncpy (path + pathlen, elt, len);
|
||||
path[pathlen + len] = '\0';
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
static char *
|
||||
|
|
Loading…
Reference in a new issue