summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-03-04 04:26:47 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-03-04 14:35:17 (GMT)
commit8108650b24adbe03543eb29015ea9bda86d0068e (patch)
treeabc14709a9304b9c267ba45ffce1e7d32a21c1a0
parent8f23a6be1069455e609e8bea7527726c24bebb36 (diff)
downloadQt-8108650b24adbe03543eb29015ea9bda86d0068e.zip
Qt-8108650b24adbe03543eb29015ea9bda86d0068e.tar.gz
Qt-8108650b24adbe03543eb29015ea9bda86d0068e.tar.bz2
Fix signature of q_atomic_test_and_set_ptr.
The lack of const results in a compile error when compiling 32-bit Qt in a 64-bit machine (-platform linux-g++-32 -xplatform linux-g++-32). Adding const is safe since expected and newval parameters are not modified by qatomic_i386.s. Task-Number: QTBUG-22479 Change-Id: Iee9f73b9bed777177aeae34bfcedb2feac83e67a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/arch/qatomic_i386.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/arch/qatomic_i386.h b/src/corelib/arch/qatomic_i386.h
index 53a8186..8e68b31 100644
--- a/src/corelib/arch/qatomic_i386.h
+++ b/src/corelib/arch/qatomic_i386.h
@@ -202,7 +202,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueTo
extern "C" {
Q_CORE_EXPORT int q_atomic_test_and_set_int(volatile int *ptr, int expected, int newval);
- Q_CORE_EXPORT int q_atomic_test_and_set_ptr(volatile void *ptr, void *expected, void *newval);
+ Q_CORE_EXPORT int q_atomic_test_and_set_ptr(volatile void *ptr, const void *expected, const void *newval);
Q_CORE_EXPORT int q_atomic_increment(volatile int *ptr);
Q_CORE_EXPORT int q_atomic_decrement(volatile int *ptr);
Q_CORE_EXPORT int q_atomic_set_int(volatile int *ptr, int newval);