mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
xcursor: use strncat instead of strncpy
strncat appends '\0' automatically and avoids the stringop-truncation warning/error
This commit is contained in:
parent
d8a422575b
commit
7dffe9339b
1 changed files with 1 additions and 5 deletions
|
@ -655,11 +655,7 @@ _XcursorAddPathElt (char *path, const char *elt, int len)
|
||||||
elt++;
|
elt++;
|
||||||
len--;
|
len--;
|
||||||
}
|
}
|
||||||
#pragma GCC diagnostic push
|
strncat (path + pathlen, elt, len);
|
||||||
#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
|
||||||
strncpy (path + pathlen, elt, len);
|
|
||||||
path[pathlen + len] = '\0';
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
|
Loading…
Reference in a new issue