Skip to content

Commit 5443334

Browse files
committed
DisplayServer (Linux): silense compiler warnings
1 parent a3a042f commit 5443334

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/detection/displayserver/linux/wayland/kde-output.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ static void waylandKdeNameListener(void* data, FF_MAYBE_UNUSED struct kde_output
113113
WaylandDisplay* display = data;
114114
display->type = ffdsGetDisplayType(name);
115115
// As display->id is used as an internal identifier, we don't need it to be NUL terminated
116+
#pragma GCC diagnostic push
117+
#pragma GCC diagnostic ignored "-Wstringop-truncation"
116118
strncpy((char*) &display->id, name, sizeof(display->id));
119+
#pragma GCC diagnostic pop
120+
117121
ffStrbufAppendS(&display->name, name);
118122
}
119123

0 commit comments

Comments
 (0)