summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess_unix.cpp
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amir.abdol@qt.io>2023-05-19 14:48:44 +0200
committerAmir Masoud Abdol <amir.abdol@qt.io>2023-05-25 08:18:45 +0200
commit69b69a7bccbb153d687b8cf228e3342fa305b93f (patch)
treea7d8124e5d74b055021ae1ca8006ce0c0850fb6e /src/corelib/io/qprocess_unix.cpp
parent11491fcc5fb9283ae9f735c4834e00926b19c8ce (diff)
Add [[maybe_unused]] to avoid compilation warnings on Android
When cross compiling for Android, these need to be marked with [[maybe_unused]] as they might break the build due to Android not having pthread cancellation feature. Pick-to: 6.5 Change-Id: I3b3fb58b5e6df8ce37c2d8d9b1b8e8295f0aebb0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qprocess_unix.cpp')
-rw-r--r--src/corelib/io/qprocess_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index 7ae28b84dd..90ee3cb0b4 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -529,7 +529,7 @@ void QProcessPrivate::startProcess()
// Disable PThread cancellation from this point on: we mustn't have it
// enabled when the child starts running nor while our state could get
// corrupted if we abruptly exited this function.
- PThreadCancelGuard cancelGuard;
+ [[maybe_unused]] PThreadCancelGuard cancelGuard;
// Start the child.
auto execChild1 = [this, workingDirFd, &argv, &envp]() {
@@ -1088,7 +1088,7 @@ bool QProcessPrivate::startDetached(qint64 *pid)
const CharPointerList envp(environment.d.constData());
// see startProcess() for more information
- PThreadCancelGuard cancelGuard;
+ [[maybe_unused]] PThreadCancelGuard cancelGuard;
auto doFork = [this]() {
if (useForkFlags(unixExtras.get()))