qt6-bb10/tests/auto/corelib/thread
Ahmad Samir 3a9526468c Handle a couple of GCC 13 warnings about dangling references
There are two temporaries, reply.arguments() returns a temporary QList
and list.at(0) returns a temporary reference to the first element. The
local reference variable would only extend the lifetime of the temporary
object it's bound to, list.at(0), but not the temporary list itself.
Even though this a false positive in this case because QList is
implicilty shared, the compiler can't tell the difference and the fix is
simple.

tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp:1845:21:
warning: possibly dangling reference to a temporary
[-Wdangling-reference]
 1845 |     const QVariant &retval = reply.arguments().at(0);
      |                     ^~~~~~
tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp:1845:50:
note: the temporary was destroyed at the end of the full expression
‘QDBusMessage::arguments() const().QList<QVariant>::at(0)’
 1845 |     const QVariant &retval = reply.arguments().at(0);
      |                              ~~~~~~~~~~~~~~~~~~~~^~~

Pick-to: 6.6 6.5 5.15
Change-Id: I03d54b56769cbd0f9f1165e4679ec4947267181a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-28 01:09:58 +03:00
..
qatomicint tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qatomicinteger tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qatomicpointer tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qfuture Fix segfault when using qfuture continuations with move only types 2023-06-10 14:28:13 +00:00
qfuturesynchronizer Handle a couple of GCC 13 warnings about dangling references 2023-06-28 01:09:58 +03:00
qfuturewatcher Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definition 2023-03-20 19:18:52 +01:00
qmutex Long live futexes for FreeBSD! 2023-06-15 04:04:56 -07:00
qmutexlocker tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qpromise QPromise: Propagate cancellation through failure handlers 2023-06-20 09:35:15 +02:00
qreadlocker tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qreadwritelock QThread: add sleep(std::chrono::nanoseconds) overload 2023-03-13 23:26:28 +02:00
qresultstore tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qsemaphore tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qthread QThread: add sleep(std::chrono::nanoseconds) overload 2023-03-13 23:26:28 +02:00
qthreadonce tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qthreadpool tst_qthreadpool: expect a warning, cleaning up the test run 2023-05-04 19:40:32 +02:00
qthreadstorage Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qwaitcondition QThread: add sleep(std::chrono::nanoseconds) overload 2023-03-13 23:26:28 +02:00
qwritelocker tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
CMakeLists.txt Rid of 'special case' markers 2023-04-13 18:30:58 +02:00