summaryrefslogtreecommitdiff
path: root/src/xwayland/Server.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2026-04-05 15:45:27 +0200
committerGitHub <noreply@github.com>2026-04-05 14:45:27 +0100
commit3af9b108909ee1e138cb8b3b6659563ab763e038 (patch)
treee76045229a67423fbba4902c46232278cff2e8f6 /src/xwayland/Server.cpp
parent3a7bd8fea2ca9711da5523dc185c05ea30ec0f35 (diff)
internal: silence compiler warnings about unused return values (#13997)
* misc: silence warnings about ignoring return value on reads silence warnings on ignored return values on read() and print an error if it occurs. * misc: silence warnings about ignoring return value on writes silence warnings on ignored return values on write() and print an error where we can, or pass them the maybe_unused attribute. * misc: silence warnings about ignoring return value on pipe silence warnings on ignored return value on pipe(), print an error and exit on failure.
Diffstat (limited to 'src/xwayland/Server.cpp')
-rw-r--r--src/xwayland/Server.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xwayland/Server.cpp b/src/xwayland/Server.cpp
index 9d40e1c9..b33dbfb5 100644
--- a/src/xwayland/Server.cpp
+++ b/src/xwayland/Server.cpp
@@ -222,7 +222,10 @@ bool CXWaylandServer::tryOpenSockets() {
continue;
char pidstr[12] = {0};
- read(fd.get(), pidstr, sizeof(pidstr) - 1);
+ if (read(fd.get(), pidstr, sizeof(pidstr) - 1) < 0) {
+ Log::logger->log(Log::ERR, "Failed to read on fd {}: {}", fd.get(), strerror(errno));
+ continue;
+ }
int32_t pid = 0;
try {