summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Juntunen <janne.juntunen@qt.io>2022-05-11 13:49:46 +0300
committerJanne Juntunen <janne.juntunen@qt.io>2022-05-11 15:20:16 +0300
commit6f1bacdd10562ffb1eed51ea3bb8993df3e23896 (patch)
tree3fdda0fd51c4f34a3e9fbca2ebecac9e9837f429
parentb253017a52988d7542a829182174323ed9b6dfc4 (diff)
client: Mark return values as unused to suppress compiler warnings
Return values of two write() functions were ignored, causing warnings which were treated as errors on webOS emulator build. Fixes: QTBUG-103378 Pick-to: 6.3 Change-Id: Ifc2e944dee376973b69220b7f75dc346c0a71e71 Reviewed-by: David Edmundson <davidedmundson@kde.org>
-rw-r--r--src/client/qwaylanddatasource.cpp3
-rw-r--r--src/client/qwaylandprimaryselectionv1.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/client/qwaylanddatasource.cpp b/src/client/qwaylanddatasource.cpp
index 5599cbd47..95e83595f 100644
--- a/src/client/qwaylanddatasource.cpp
+++ b/src/client/qwaylanddatasource.cpp
@@ -93,7 +93,8 @@ void QWaylandDataSource::data_source_send(const QString &mime_type, int32_t fd)
action.sa_flags = 0;
sigaction(SIGPIPE, &action, &oldAction);
- write(fd, content.constData(), content.size());
+ ssize_t unused = write(fd, content.constData(), content.size());
+ Q_UNUSED(unused);
sigaction(SIGPIPE, &oldAction, nullptr);
}
close(fd);
diff --git a/src/client/qwaylandprimaryselectionv1.cpp b/src/client/qwaylandprimaryselectionv1.cpp
index 832f96780..5cee3299f 100644
--- a/src/client/qwaylandprimaryselectionv1.cpp
+++ b/src/client/qwaylandprimaryselectionv1.cpp
@@ -160,7 +160,8 @@ void QWaylandPrimarySelectionSourceV1::zwp_primary_selection_source_v1_send(cons
action.sa_flags = 0;
sigaction(SIGPIPE, &action, &oldAction);
- write(fd, content.constData(), size_t(content.size()));
+ ssize_t unused = write(fd, content.constData(), size_t(content.size()));
+ Q_UNUSED(unused);
sigaction(SIGPIPE, &oldAction, nullptr);
}
close(fd);