xcursor: use memcpy() to append string of known size
Since len <= strlen(elt) is known, we don't need a str*() function. Let's
simply do memcpy() to suppress linter false positive.
Fixes
@@ -655,11 +655,8 @@ _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);
+ memcpy (path + pathlen, elt, len);
path[pathlen + len] = '\0';
-#pragma GCC diagnostic pop
}
static char *
