mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-25 08:32:30 +00:00
backend/drm: avoid gcc stringop-truncation warning
This commit is contained in:
parent
352fdd1bb0
commit
917ecca58e
@ -1317,8 +1317,8 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
|
||||
wlr_output_init(&wlr_conn->output, &drm->backend, &output_impl,
|
||||
drm->display);
|
||||
|
||||
strncpy(wlr_conn->output.name, wlr_conn->name,
|
||||
sizeof(wlr_conn->output.name) - 1);
|
||||
memcpy(wlr_conn->output.name, wlr_conn->name,
|
||||
sizeof(wlr_conn->output.name));
|
||||
|
||||
wlr_conn->output.phys_width = drm_conn->mmWidth;
|
||||
wlr_conn->output.phys_height = drm_conn->mmHeight;
|
||||
|
Loading…
Reference in New Issue
Block a user