aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-08-17 07:44:39 -0700
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-08-21 21:14:08 +0000
commita8152e5933a9dd53eb60b422e711212e7d91c29a (patch)
tree8899d4a29233b094443d1c5511af95cc36387884
parent71f7338f0c6fe5db72bc0fb59527b3ad52fc1bd2 (diff)
QML: remove pthread_attr_init() from stackPropertiesGeneric()
The docs for pthread_getattr_np() say: "The pthread_getattr_np() function initializes the thread attributes object referred to by attr" The comment in the glibc pthreads.h implementation even says: /* Initialize thread attribute *ATTR with attributes corresponding to the already running thread TH. It shall be called on uninitialized ATTR and destroyed with pthread_attr_destroy when no longer needed. */ Change-Id: I964c2b1e6b834feb9710fffd177c32dbb898fa3c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 9f4aeeabb982cfc4306c9d350dbb68f64914fb32) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/qml/memory/qv4stacklimits.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/qml/memory/qv4stacklimits.cpp b/src/qml/memory/qv4stacklimits.cpp
index 663ece09a2..b8e7e38b92 100644
--- a/src/qml/memory/qv4stacklimits.cpp
+++ b/src/qml/memory/qv4stacklimits.cpp
@@ -234,7 +234,6 @@ StackProperties stackPropertiesGeneric(qsizetype stackSize = 0)
pthread_t thread = pthread_self();
pthread_attr_t sattr;
- pthread_attr_init(&sattr);
# if defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(Q_OS_NETBSD)
pthread_attr_get_np(thread, &sattr);
# else