summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Funk <kfunk@kde.org>2014-08-07 15:42:16 (GMT)
committerKevin Funk <kevin.funk@kdab.com>2014-08-11 15:18:23 (GMT)
commitf5231b768e9986b9519af1a0d2eff1891adaeba2 (patch)
tree6dc2744965394449f5b3f108eda8ab2bdc0efca7
parentbfa0be8a1bf68200f1ba98888deff4a9215ee066 (diff)
downloadQt-f5231b768e9986b9519af1a0d2eff1891adaeba2.zip
Qt-f5231b768e9986b9519af1a0d2eff1891adaeba2.tar.gz
Qt-f5231b768e9986b9519af1a0d2eff1891adaeba2.tar.bz2
Remove use of 'register' from Qt.
It is deprecated and clang is warning about it [-Wdeprecated-register]. Original patch from Stephen Kelly, see commit d9fb6e6dbb2b322556d581265da2442e3b91a6a3 in qt5/qtbase This is a backport of this commit + additional manual replacements in header files. There are still some 'register' uses inside implementation files left, but headers are all 'register'-free now. Change-Id: I7225381df1f093073583d62fa86f7bd7cca869c7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/arch/qatomic_alpha.h40
-rw-r--r--src/corelib/arch/qatomic_armv6.h30
-rw-r--r--src/corelib/arch/qatomic_ia64.h16
-rw-r--r--src/corelib/arch/qatomic_sh4a.h36
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp2
-rw-r--r--src/corelib/kernel/qcore_unix.cpp2
-rw-r--r--src/corelib/kernel/qcore_unix_p.h10
-rw-r--r--src/corelib/kernel/qmetatype.h2
-rw-r--r--src/corelib/kernel/qsystemsemaphore_unix.cpp2
-rw-r--r--src/corelib/tools/qbytearray.cpp20
-rw-r--r--src/corelib/tools/qbytearraymatcher.cpp2
-rw-r--r--src/corelib/tools/qlocale_tools.cpp24
-rw-r--r--src/corelib/tools/qlocale_tools_p.h4
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h10
-rw-r--r--src/corelib/tools/qstring.cpp10
-rw-r--r--src/corelib/tools/qstringmatcher.cpp2
-rw-r--r--src/dbus/qdbusutil.cpp8
-rw-r--r--src/gui/image/qbmphandler.cpp10
-rw-r--r--src/gui/image/qimage.cpp10
-rw-r--r--src/gui/image/qppmhandler.cpp2
-rw-r--r--src/gui/image/qxbmhandler.cpp4
-rw-r--r--src/gui/painting/qdrawhelper.cpp8
-rw-r--r--src/gui/painting/qdrawhelper_p.h4
-rw-r--r--src/gui/painting/qpolygon.cpp12
-rw-r--r--src/gui/painting/qregion.cpp142
-rw-r--r--src/network/access/qnetworkcookie_p.h2
-rw-r--r--src/network/socket/qnet_unix_p.h8
-rw-r--r--src/plugins/imageformats/ico/qicohandler.cpp4
28 files changed, 213 insertions, 213 deletions
diff --git a/src/corelib/arch/qatomic_alpha.h b/src/corelib/arch/qatomic_alpha.h
index 08b7c0c..91f6397 100644
--- a/src/corelib/arch/qatomic_alpha.h
+++ b/src/corelib/arch/qatomic_alpha.h
@@ -105,7 +105,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
inline bool QBasicAtomicInt::ref()
{
- register int old, tmp;
+ int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"addl %0,1,%1\n" /* tmp=old+1; */
@@ -122,7 +122,7 @@ inline bool QBasicAtomicInt::ref()
inline bool QBasicAtomicInt::deref()
{
- register int old, tmp;
+ int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"subl %0,1,%1\n" /* tmp=old-1; */
@@ -139,7 +139,7 @@ inline bool QBasicAtomicInt::deref()
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
- register int ret;
+ int ret;
asm volatile("1:\n"
"ldl_l %0,%1\n" /* ret=*ptr; */
"cmpeq %0,%2,%0\n"/* if (ret==expected) ret=0; else ret=1; */
@@ -158,7 +158,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{
- register int ret;
+ int ret;
asm volatile("1:\n"
"ldl_l %0,%1\n" /* ret=*ptr; */
"cmpeq %0,%2,%0\n"/* if (ret==expected) ret=0; else ret=1; */
@@ -178,7 +178,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{
- register int ret;
+ int ret;
asm volatile("mb\n"
"1:\n"
"ldl_l %0,%1\n" /* ret=*ptr; */
@@ -198,7 +198,7 @@ inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
{
- register int old, tmp;
+ int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@@ -215,7 +215,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
{
- register int old, tmp;
+ int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@@ -233,7 +233,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
{
- register int old, tmp;
+ int old, tmp;
asm volatile("mb\n"
"1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
@@ -251,7 +251,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
{
- register int old, tmp;
+ int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"addl %0,%3,%1\n"/* tmp=old+value; */
@@ -268,7 +268,7 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
{
- register int old, tmp;
+ int old, tmp;
asm volatile("1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
"addl %0,%3,%1\n"/* tmp=old+value; */
@@ -286,7 +286,7 @@ inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
{
- register int old, tmp;
+ int old, tmp;
asm volatile("mb\n"
"1:\n"
"ldl_l %0,%2\n" /* old=*ptr; */
@@ -305,7 +305,7 @@ inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
{
- register void *ret;
+ void *ret;
asm volatile("1:\n"
"ldq_l %0,%1\n" /* ret=*ptr; */
"cmpeq %0,%2,%0\n"/* if (ret==expected) tmp=0; else tmp=1; */
@@ -325,7 +325,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
{
- register void *ret;
+ void *ret;
asm volatile("1:\n"
"ldq_l %0,%1\n" /* ret=*ptr; */
"cmpeq %0,%2,%0\n"/* if (ret==expected) tmp=0; else tmp=1; */
@@ -346,7 +346,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
{
- register void *ret;
+ void *ret;
asm volatile("mb\n"
"1:\n"
"ldq_l %0,%1\n" /* ret=*ptr; */
@@ -367,7 +367,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
{
- register T *old, *tmp;
+ T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@@ -385,7 +385,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
{
- register T *old, *tmp;
+ T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"mov %3,%1\n" /* tmp=newval; */
@@ -404,7 +404,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
{
- register T *old, *tmp;
+ T *old, *tmp;
asm volatile("mb\n"
"1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
@@ -423,7 +423,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
{
- register T *old, *tmp;
+ T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"addq %0,%3,%1\n"/* tmp=old+value; */
@@ -441,7 +441,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
{
- register T *old, *tmp;
+ T *old, *tmp;
asm volatile("1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
"addq %0,%3,%1\n"/* tmp=old+value; */
@@ -460,7 +460,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
{
- register T *old, *tmp;
+ T *old, *tmp;
asm volatile("mb\n"
"1:\n"
"ldq_l %0,%2\n" /* old=*ptr; */
diff --git a/src/corelib/arch/qatomic_armv6.h b/src/corelib/arch/qatomic_armv6.h
index 0ae629b..6b3a860 100644
--- a/src/corelib/arch/qatomic_armv6.h
+++ b/src/corelib/arch/qatomic_armv6.h
@@ -148,7 +148,7 @@ inline bool QBasicAtomicInt::deref()
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
- register int result;
+ int result;
asm volatile("0:\n"
"ldrex %[result], [%[_q_value]]\n"
"eors %[result], %[result], %[expectedValue]\n"
@@ -303,8 +303,8 @@ inline bool QBasicAtomicInt::ref()
inline bool QBasicAtomicInt::deref()
{
- register int newValue;
- register int result;
+ int newValue;
+ int result;
retry:
__asm {
ldrex newValue, [&_q_value]
@@ -318,7 +318,7 @@ inline bool QBasicAtomicInt::deref()
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
- register int result;
+ int result;
retry:
__asm {
ldrex result, [&_q_value]
@@ -332,8 +332,8 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
{
- register int originalValue;
- register int result;
+ int originalValue;
+ int result;
retry:
__asm {
ldrex originalValue, [&_q_value]
@@ -346,9 +346,9 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
{
- register int originalValue;
- register int newValue;
- register int result;
+ int originalValue;
+ int newValue;
+ int result;
retry:
__asm {
ldrex originalValue, [&_q_value]
@@ -363,7 +363,7 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
{
- register T *result;
+ T *result;
retry:
__asm {
ldrex result, [&_q_value]
@@ -378,8 +378,8 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
{
- register T *originalValue;
- register int result;
+ T *originalValue;
+ int result;
retry:
__asm {
ldrex originalValue, [&_q_value]
@@ -393,9 +393,9 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
{
- register T *originalValue;
- register T *newValue;
- register int result;
+ T *originalValue;
+ T *newValue;
+ int result;
retry:
__asm {
ldrex originalValue, [&_q_value]
diff --git a/src/corelib/arch/qatomic_ia64.h b/src/corelib/arch/qatomic_ia64.h
index 6fc6307..a3d3fa8 100644
--- a/src/corelib/arch/qatomic_ia64.h
+++ b/src/corelib/arch/qatomic_ia64.h
@@ -106,7 +106,7 @@ template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
{ return false; }
-inline bool _q_ia64_fetchadd_immediate(register int value)
+inline bool _q_ia64_fetchadd_immediate(int value)
{
return value == 1 || value == -1
|| value == 4 || value == -4
@@ -132,7 +132,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
- register int expectedValueCopy = expectedValue;
+ int expectedValueCopy = expectedValue;
return (static_cast<int>(_InterlockedCompareExchange(&_q_value,
newValue,
expectedValueCopy))
@@ -141,7 +141,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{
- register int expectedValueCopy = expectedValue;
+ int expectedValueCopy = expectedValue;
return (static_cast<int>(_InterlockedCompareExchange_acq(reinterpret_cast<volatile uint *>(&_q_value),
newValue,
expectedValueCopy))
@@ -150,7 +150,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{
- register int expectedValueCopy = expectedValue;
+ int expectedValueCopy = expectedValue;
return (static_cast<int>(_InterlockedCompareExchange_rel(reinterpret_cast<volatile uint *>(&_q_value),
newValue,
expectedValueCopy))
@@ -218,7 +218,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
{
- register T *expectedValueCopy = expectedValue;
+ T *expectedValueCopy = expectedValue;
return (_InterlockedCompareExchangePointer(reinterpret_cast<void * volatile*>(&_q_value),
newValue,
expectedValueCopy)
@@ -233,7 +233,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
volatile unsigned long *p;
};
x = &_q_value;
- register T *expectedValueCopy = expectedValue;
+ T *expectedValueCopy = expectedValue;
return (_InterlockedCompareExchange64_acq(p, quintptr(newValue), quintptr(expectedValueCopy))
== quintptr(expectedValue));
}
@@ -246,7 +246,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
volatile unsigned long *p;
};
x = &_q_value;
- register T *expectedValueCopy = expectedValue;
+ T *expectedValueCopy = expectedValue;
return (_InterlockedCompareExchange64_rel(p, quintptr(newValue), quintptr(expectedValueCopy))
== quintptr(expectedValue));
}
@@ -592,7 +592,7 @@ inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
&_q_value, -1, (_Asm_ldhint)_LDHINT_NONE, FENCE);
// implement the test-and-set loop
- register int old, ret;
+ int old, ret;
do {
old = _q_value;
_Asm_mov_to_ar((_Asm_app_reg)_AREG_CCV, (unsigned)old, FENCE);
diff --git a/src/corelib/arch/qatomic_sh4a.h b/src/corelib/arch/qatomic_sh4a.h
index 3232298..465b6e2 100644
--- a/src/corelib/arch/qatomic_sh4a.h
+++ b/src/corelib/arch/qatomic_sh4a.h
@@ -144,7 +144,7 @@ inline bool QBasicAtomicInt::deref()
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
- register int result;
+ int result;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"xor %[expectedValue], r0\n"
@@ -166,7 +166,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{
- register int result;
+ int result;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"xor %[expectedValue], r0\n"
@@ -189,7 +189,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{
- register int result;
+ int result;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@@ -217,7 +217,7 @@ inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
{
- register int originalValue;
+ int originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -234,7 +234,7 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
{
- register int originalValue;
+ int originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -252,7 +252,7 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
{
- register int originalValue;
+ int originalValue;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@@ -275,7 +275,7 @@ inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
{
- register int originalValue;
+ int originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -292,7 +292,7 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
{
- register int originalValue;
+ int originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -310,7 +310,7 @@ inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
{
- register int originalValue;
+ int originalValue;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@@ -334,7 +334,7 @@ inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd)
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
{
- register T *result;
+ T *result;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"xor %[expectedValue], r0\n"
@@ -357,7 +357,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
{
- register T *result;
+ T *result;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"xor %[expectedValue], r0\n"
@@ -381,7 +381,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
{
- register T *result;
+ T *result;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@@ -411,7 +411,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValu
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
{
- register T *originalValue;
+ T *originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -429,7 +429,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
{
- register T *originalValue;
+ T *originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -448,7 +448,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
{
- register T *originalValue;
+ T *originalValue;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
@@ -473,7 +473,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
{
- register T *originalValue;
+ T *originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -491,7 +491,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
{
- register T *originalValue;
+ T *originalValue;
asm volatile("0:\n"
"movli.l @%[_q_value], r0\n"
"mov r0, %[originalValue]\n"
@@ -510,7 +510,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueTo
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
{
- register T *originalValue;
+ T *originalValue;
asm volatile("synco\n"
"0:\n"
"movli.l @%[_q_value], r0\n"
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index b05a228..dd8ddc4 100644
--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp
+++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp
@@ -229,7 +229,7 @@ QT_BEGIN_NAMESPACE
QInotifyFileSystemWatcherEngine *QInotifyFileSystemWatcherEngine::create()
{
- register int fd = -1;
+ int fd = -1;
#ifdef IN_CLOEXEC
fd = inotify_init1(IN_CLOEXEC);
#endif
diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp
index aed1cf5..66e31a5 100644
--- a/src/corelib/kernel/qcore_unix.cpp
+++ b/src/corelib/kernel/qcore_unix.cpp
@@ -75,7 +75,7 @@ int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
{
if (!orig_timeout) {
// no timeout -> block forever
- register int ret;
+ int ret;
EINTR_LOOP(ret, select(nfds, fdread, fdwrite, fdexcept, 0));
return ret;
}
diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h
index e086255..8ea2ed2 100644
--- a/src/corelib/kernel/qcore_unix_p.h
+++ b/src/corelib/kernel/qcore_unix_p.h
@@ -173,7 +173,7 @@ static inline int qt_safe_open(const char *pathname, int flags, mode_t mode = 07
#ifdef O_CLOEXEC
flags |= O_CLOEXEC;
#endif
- register int fd;
+ int fd;
EINTR_LOOP(fd, QT_OPEN(pathname, flags, mode));
// unknown flags are ignored, so we have no way of verifying if
@@ -196,7 +196,7 @@ static inline int qt_safe_pipe(int pipefd[2], int flags = 0)
Q_ASSERT((flags & ~O_NONBLOCK) == 0);
#endif
- register int ret;
+ int ret;
#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC && defined(O_CLOEXEC)
// use pipe2
flags |= O_CLOEXEC;
@@ -228,7 +228,7 @@ static inline int qt_safe_dup(int oldfd, int atleast = 0, int flags = FD_CLOEXEC
{
Q_ASSERT(flags == FD_CLOEXEC || flags == 0);
- register int ret;
+ int ret;
#ifdef F_DUPFD_CLOEXEC
// use this fcntl
if (flags & FD_CLOEXEC) {
@@ -252,7 +252,7 @@ static inline int qt_safe_dup2(int oldfd, int newfd, int flags = FD_CLOEXEC)
{
Q_ASSERT(flags == FD_CLOEXEC || flags == 0);
- register int ret;
+ int ret;
#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC && defined(O_CLOEXEC)
// use dup3
if (flags & FD_CLOEXEC) {
@@ -296,7 +296,7 @@ static inline qint64 qt_safe_write_nosignal(int fd, const void *data, qint64 len
static inline int qt_safe_close(int fd)
{
- register int ret;
+ int ret;
EINTR_LOOP(ret, QT_CLOSE(fd));
return ret;
}
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index 9ac6862..66d56c0 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -253,7 +253,7 @@ inline int qRegisterMetaTypeStreamOperators()
SavePtr sptr = qMetaTypeSaveHelper<T>;
LoadPtr lptr = qMetaTypeLoadHelper<T>;
- register int id = qMetaTypeId<T>();
+ int id = qMetaTypeId<T>();
QMetaType::registerStreamOperators(id,
reinterpret_cast<QMetaType::SaveOperator>(sptr),
reinterpret_cast<QMetaType::LoadOperator>(lptr));
diff --git a/src/corelib/kernel/qsystemsemaphore_unix.cpp b/src/corelib/kernel/qsystemsemaphore_unix.cpp
index 6db654c..9fb4699 100644
--- a/src/corelib/kernel/qsystemsemaphore_unix.cpp
+++ b/src/corelib/kernel/qsystemsemaphore_unix.cpp
@@ -299,7 +299,7 @@ bool QSystemSemaphorePrivate::modifySemaphore(int count)
operation.sem_op = count;
operation.sem_flg = SEM_UNDO;
- register int res;
+ int res;
EINTR_LOOP(res, semop(semaphore, &operation, 1));
if (-1 == res) {
// If the semaphore was removed be nice and create it and then modifySemaphore again
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 481c026..2514303 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -263,8 +263,8 @@ int qstrcmp(const char *str1, const char *str2)
int qstricmp(const char *str1, const char *str2)
{
- register const uchar *s1 = reinterpret_cast<const uchar *>(str1);
- register const uchar *s2 = reinterpret_cast<const uchar *>(str2);
+ const uchar *s1 = reinterpret_cast<const uchar *>(str1);
+ const uchar *s2 = reinterpret_cast<const uchar *>(str2);
int res;
uchar c;
if (!s1 || !s2)
@@ -297,8 +297,8 @@ int qstricmp(const char *str1, const char *str2)
int qstrnicmp(const char *str1, const char *str2, uint len)
{
- register const uchar *s1 = reinterpret_cast<const uchar *>(str1);
- register const uchar *s2 = reinterpret_cast<const uchar *>(str2);
+ const uchar *s1 = reinterpret_cast<const uchar *>(str1);
+ const uchar *s2 = reinterpret_cast<const uchar *>(str2);
int res;
uchar c;
if (!s1 || !s2)
@@ -323,7 +323,7 @@ int qstrcmp(const QByteArray &str1, const char *str2)
const char *str1data = str1.constData();
const char *str1end = str1data + str1.length();
for ( ; str1data < str1end && *str2; ++str1data, ++str2) {
- register int diff = int(uchar(*str1data)) - uchar(*str2);
+ int diff = int(uchar(*str1data)) - uchar(*str2);
if (diff)
// found a difference
return diff;
@@ -359,8 +359,8 @@ int qstrcmp(const QByteArray &str1, const QByteArray &str2)
#if 0
static void createCRC16Table() // build CRC16 lookup table
{
- register unsigned int i;
- register unsigned int j;
+ unsigned int i;
+ unsigned int j;
unsigned short crc_tbl[16];
unsigned int v0, v1, v2, v3;
for (i = 0; i < 16; i++) {
@@ -412,7 +412,7 @@ static const quint16 crc_tbl[16] = {
quint16 qChecksum(const char *data, uint len)
{
- register quint16 crc = 0xffff;
+ quint16 crc = 0xffff;
uchar c;
const uchar *p = reinterpret_cast<const uchar *>(data);
while (len--) {
@@ -2679,7 +2679,7 @@ QByteArray QByteArray::mid(int pos, int len) const
QByteArray QByteArray::toLower() const
{
QByteArray s(*this);
- register uchar *p = reinterpret_cast<uchar *>(s.data());
+ uchar *p = reinterpret_cast<uchar *>(s.data());
if (p) {
while (*p) {
*p = QChar::toLower((ushort)*p);
@@ -2702,7 +2702,7 @@ QByteArray QByteArray::toLower() const
QByteArray QByteArray::toUpper() const
{
QByteArray s(*this);
- register uchar *p = reinterpret_cast<uchar *>(s.data());
+ uchar *p = reinterpret_cast<uchar *>(s.data());
if (p) {
while (*p) {
*p = QChar::toUpper((ushort)*p);
diff --git a/src/corelib/tools/qbytearraymatcher.cpp b/src/corelib/tools/qbytearraymatcher.cpp
index cb8f2f1..7c1777b 100644
--- a/src/corelib/tools/qbytearraymatcher.cpp
+++ b/src/corelib/tools/qbytearraymatcher.cpp
@@ -61,7 +61,7 @@ static inline int bm_find(const uchar *cc, int l, int index, const uchar *puc, u
return index > l ? -1 : index;
const uint pl_minus_one = pl - 1;
- register const uchar *current = cc + index + pl_minus_one;
+ const uchar *current = cc + index + pl_minus_one;
const uchar *end = cc + l;
while (current < end) {
uint skip = skiptable[*current];
diff --git a/src/corelib/tools/qlocale_tools.cpp b/src/corelib/tools/qlocale_tools.cpp
index f353149..b30af30 100644
--- a/src/corelib/tools/qlocale_tools.cpp
+++ b/src/corelib/tools/qlocale_tools.cpp
@@ -307,13 +307,13 @@ inline bool isascii(int c)
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
-qulonglong qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok)
+qulonglong qstrtoull(const char *nptr, const char **endptr, int base, bool *ok)
{
- register const char *s = nptr;
- register qulonglong acc;
- register unsigned char c;
- register qulonglong qbase, cutoff;
- register int any, cutlim;
+ const char *s = nptr;
+ qulonglong acc;
+ unsigned char c;
+ qulonglong qbase, cutoff;
+ int any, cutlim;
if (ok != 0)
*ok = true;
@@ -388,13 +388,13 @@ qulonglong qstrtoull(const char *nptr, const char **endptr, register int base, b
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
-qlonglong qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok)
+qlonglong qstrtoll(const char *nptr, const char **endptr, int base, bool *ok)
{
- register const char *s;
- register qulonglong acc;
- register unsigned char c;
- register qulonglong qbase, cutoff;
- register int neg, any, cutlim;
+ const char *s;
+ qulonglong acc;
+ unsigned char c;
+ qulonglong qbase, cutoff;
+ int neg, any, cutlim;
/*
* Skip white space and pick up leading +/- sign if any.
diff --git a/src/corelib/tools/qlocale_tools_p.h b/src/corelib/tools/qlocale_tools_p.h
index 4e8b805..3aa7344 100644
--- a/src/corelib/tools/qlocale_tools_p.h
+++ b/src/corelib/tools/qlocale_tools_p.h
@@ -114,8 +114,8 @@ bool removeGroupSeparators(QLocalePrivate::CharBuff *num);
Q_CORE_EXPORT char *qdtoa(double d, int mode, int ndigits, int *decpt,
int *sign, char **rve, char **digits_str);
Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok);
-qlonglong qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok);
-qulonglong qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok);
+qlonglong qstrtoll(const char *nptr, const char **endptr, int base, bool *ok);
+qulonglong qstrtoull(const char *nptr, const char **endptr, int base, bool *ok);
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 526ad30..8624331 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -432,7 +432,7 @@ namespace QtSharedPointer {
if (o) {
// increase the strongref, but never up from zero
// or less (-1 is used by QWeakPointer on untracked QObject)
- register int tmp = o->strongref;
+ int tmp = o->strongref;
while (tmp > 0) {
// try to increment from "tmp" to "tmp + 1"
if (o->strongref.testAndSetRelaxed(tmp, tmp + 1))
@@ -819,7 +819,7 @@ namespace QtSharedPointer {
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerCast(const QSharedPointer<T> &src)
{
- register X *ptr = static_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
+ X *ptr = static_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
return QtSharedPointer::copyAndSetPointer(ptr, src);
}
template <class X, class T>
@@ -831,7 +831,7 @@ Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerCast(const QWeakPointer<T> &sr
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerDynamicCast(const QSharedPointer<T> &src)
{
- register X *ptr = dynamic_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
+ X *ptr = dynamic_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
if (!ptr)
return QSharedPointer<X>();
return QtSharedPointer::copyAndSetPointer(ptr, src);
@@ -845,7 +845,7 @@ Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerDynamicCast(const QWeakPointer
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerConstCast(const QSharedPointer<T> &src)
{
- register X *ptr = const_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
+ X *ptr = const_cast<X *>(src.data()); // if you get an error in this line, the cast is invalid
return QtSharedPointer::copyAndSetPointer(ptr, src);
}
template <class X, class T>
@@ -865,7 +865,7 @@ QWeakPointer<X> qWeakPointerCast(const QSharedPointer<T> &src)
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerObjectCast(const QSharedPointer<T> &src)
{
- register X *ptr = qobject_cast<X *>(src.data());
+ X *ptr = qobject_cast<X *>(src.data());
return QtSharedPointer::copyAndSetPointer(ptr, src);
}
template <class X, class T>
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 7c8986f..051b95c 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -275,7 +275,7 @@ static bool qMemEquals(const quint16 *a, const quint16 *b, int length)
if (a == b || !length)
return true;
- register union {
+ union {
const quint16 *w;
const quint32 *d;
quintptr value;
@@ -300,7 +300,7 @@ static bool qMemEquals(const quint16 *a, const quint16 *b, int length)
// both addresses are 4-bytes aligned
// do a fast 32-bit comparison
- register const quint32 *e = sa.d + (length >> 1);
+ const quint32 *e = sa.d + (length >> 1);
for ( ; sa.d != e; ++sa.d, ++sb.d) {
if (*sa.d != *sb.d)
return false;
@@ -310,7 +310,7 @@ static bool qMemEquals(const quint16 *a, const quint16 *b, int length)
return (length & 1) ? *sa.w == *sb.w : true;
} else {
// one of the addresses isn't 4-byte aligned but the other is
- register const quint16 *e = sa.w + length;
+ const quint16 *e = sa.w + length;
for ( ; sa.w != e; ++sa.w, ++sb.w) {
if (*sa.w != *sb.w)
return false;
@@ -4709,8 +4709,8 @@ int QString::compare_helper(const QChar *data1, int length1, const QChar *data2,
{
if (cs == Qt::CaseSensitive)
return ucstrcmp(data1, length1, data2, length2);
- register const ushort *s1 = reinterpret_cast<const ushort *>(data1);
- register const ushort *s2 = reinterpret_cast<const ushort *>(data2);
+ const ushort *s1 = reinterpret_cast<const ushort *>(data1);
+ const ushort *s2 = reinterpret_cast<const ushort *>(data2);
return ucstricmp(s1, s1 + length1, s2, s2 + length2);
}
diff --git a/src/corelib/tools/qstringmatcher.cpp b/src/corelib/tools/qstringmatcher.cpp
index 7789ad2..f045df4 100644
--- a/src/corelib/tools/qstringmatcher.cpp
+++ b/src/corelib/tools/qstringmatcher.cpp
@@ -69,7 +69,7 @@ static inline int bm_find(const ushort *uc, uint l, int index, const ushort *puc
return index > (int)l ? -1 : index;
const uint pl_minus_one = pl - 1;
- register const ushort *current = uc + index + pl_minus_one;
+ const ushort *current = uc + index + pl_minus_one;
const ushort *end = uc + l;
if (cs == Qt::CaseSensitive) {
while (current < end) {
diff --git a/src/dbus/qdbusutil.cpp b/src/dbus/qdbusutil.cpp
index 655e791..c0820d1 100644
--- a/src/dbus/qdbusutil.cpp
+++ b/src/dbus/qdbusutil.cpp
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
static inline bool isValidCharacterNoDash(const QChar &c)
{
- register ushort u = c.unicode();
+ ushort u = c.unicode();
return (u >= 'a' && u <= 'z')
|| (u >= 'A' && u <= 'Z')
|| (u >= '0' && u <= '9')
@@ -63,7 +63,7 @@ static inline bool isValidCharacterNoDash(const QChar &c)
static inline bool isValidCharacter(const QChar &c)
{
- register ushort u = c.unicode();
+ ushort u = c.unicode();
return (u >= 'a' && u <= 'z')
|| (u >= 'A' && u <= 'Z')
|| (u >= '0' && u <= '9')
@@ -72,7 +72,7 @@ static inline bool isValidCharacter(const QChar &c)
static inline bool isValidNumber(const QChar &c)
{
- register ushort u = c.unicode();
+ ushort u = c.unicode();
return (u >= '0' && u <= '9');
}
@@ -257,7 +257,7 @@ static bool isFixedType(int c)
// returns NULL if it isn't valid.
static const char *validateSingleType(const char *signature)
{
- register char c = *signature;
+ char c = *signature;
if (c == DBUS_TYPE_INVALID)
return 0;
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index 8b047d8..b22e842 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -53,7 +53,7 @@ static void swapPixel01(QImage *image) // 1-bpp: swap 0 and 1 pixels
{
int i;
if (image->depth() == 1 && image->colorCount() == 2) {
- register uint *p = (uint *)image->bits();
+ uint *p = (uint *)image->bits();
int nbytes = image->byteCount();
for (i=0; i<nbytes/4; i++) {
*p = ~*p;
@@ -368,7 +368,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
if (comp == BMP_RLE4) { // run length compression
int x=0, y=0, c, i;
quint8 b;
- register uchar *p = data + (h-1)*bpl;
+ uchar *p = data + (h-1)*bpl;
const uchar *endp = p + w;
while (y < h) {
if (!d->getChar((char *)&b))
@@ -440,7 +440,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
while (--h >= 0) {
if (d->read((char*)buf,buflen) != buflen)
break;
- register uchar *p = data + h*bpl;
+ uchar *p = data + h*bpl;
uchar *b = buf;
for (int i=0; i<w/2; i++) { // convert nibbles to bytes
*p++ = *b >> 4;
@@ -457,7 +457,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
if (comp == BMP_RLE8) { // run length compression
int x=0, y=0;
quint8 b;
- register uchar *p = data + (h-1)*bpl;
+ uchar *p = data + (h-1)*bpl;
const uchar *endp = p + w;
while (y < h) {
if (!d->getChar((char *)&b))
@@ -520,7 +520,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
}
else if (nbits == 16 || nbits == 24 || nbits == 32) { // 16,24,32 bit BMP image
- register QRgb *p;
+ QRgb *p;
QRgb *end;
uchar *buf24 = new uchar[bpl];
int bpl24 = ((w*nbits+31)/32)*4;
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index b7becb4..800b886 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -2747,7 +2747,7 @@ static void dither_to_Mono(QImageData *dst, const QImageData *src,
int *b1, *b2;
int wbytes = w * (d/8);
- register const uchar *p = src->data;
+ const uchar *p = src->data;
const uchar *end = p + wbytes;
b2 = line2;
if (use_gray) { // 8 bit image
@@ -3307,7 +3307,7 @@ static void convert_Mono_to_X32(QImageData *dest, const QImageData *src, Qt::Ima
uchar *dest_data = dest->data;
if (src->format == QImage::Format_Mono) {
for (int y = 0; y < dest->height; y++) {
- register uint *p = (uint *)dest_data;
+ uint *p = (uint *)dest_data;
for (int x = 0; x < dest->width; x++)
*p++ = colorTable.at((src_data[x>>3] >> (7 - (x & 7))) & 1);
@@ -3316,7 +3316,7 @@ static void convert_Mono_to_X32(QImageData *dest, const QImageData *src, Qt::Ima
}
} else {
for (int y = 0; y < dest->height; y++) {
- register uint *p = (uint *)dest_data;
+ uint *p = (uint *)dest_data;
for (int x = 0; x < dest->width; x++)
*p++ = colorTable.at((src_data[x>>3] >> (x & 7)) & 1);
@@ -3350,7 +3350,7 @@ static void convert_Mono_to_Indexed8(QImageData *dest, const QImageData *src, Qt
uchar *dest_data = dest->data;
if (src->format == QImage::Format_Mono) {
for (int y = 0; y < dest->height; y++) {
- register uchar *p = dest_data;
+ uchar *p = dest_data;
for (int x = 0; x < dest->width; x++)
*p++ = (src_data[x>>3] >> (7 - (x & 7))) & 1;
src_data += src->bytes_per_line;
@@ -3358,7 +3358,7 @@ static void convert_Mono_to_Indexed8(QImageData *dest, const QImageData *src, Qt
}
} else {
for (int y = 0; y < dest->height; y++) {
- register uchar *p = dest_data;
+ uchar *p = dest_data;
for (int x = 0; x < dest->width; x++)
*p++ = (src_data[x>>3] >> (x & 7)) & 1;
src_data += src->bytes_per_line;
diff --git a/src/gui/image/qppmhandler.cpp b/src/gui/image/qppmhandler.cpp
index 1732d95..d3eaab2 100644
--- a/src/gui/image/qppmhandler.cpp
+++ b/src/gui/image/qppmhandler.cpp
@@ -188,7 +188,7 @@ static bool read_pbm_body(QIODevice *device, char type, int w, int h, int mcc, Q
}
}
} else { // read ascii data
- register uchar *p;
+ uchar *p;
int n;
for (y=0; y<h; y++) {
p = outImage->scanLine(y);
diff --git a/src/gui/image/qxbmhandler.cpp b/src/gui/image/qxbmhandler.cpp
index 201118f..6bcf91f 100644
--- a/src/gui/image/qxbmhandler.cpp
+++ b/src/gui/image/qxbmhandler.cpp
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
X bitmap image read/write functions
*****************************************************************************/
-static inline int hex2byte(register char *p)
+static inline int hex2byte(char *p)
{
return ((isdigit((uchar) *p) ? *p - '0' : toupper((uchar) *p) - 'A' + 10) << 4) |
(isdigit((uchar) *(p+1)) ? *(p+1) - '0' : toupper((uchar) *(p+1)) - 'A' + 10);
@@ -215,7 +215,7 @@ static bool write_xbm_image(const QImage &sourceImage, QIODevice *device, const
}
}
int bcnt = 0;
- register char *p = buf;
+ char *p = buf;
int bpl = (w+7)/8;
for (int y = 0; y < h; ++y) {
uchar *b = image.scanLine(y);
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index a547212..d50bccc 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -901,13 +901,13 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator *
fx &= fixed_scale - 1;
Q_ASSERT((fx >> 16) == 0);
while (b < end) {
- register int x1 = (fx >> 16);
- register int x2 = x1 + 1;
+ int x1 = (fx >> 16);
+ int x2 = x1 + 1;
Q_ASSERT(x1 >= 0);
Q_ASSERT(x2 < count);
- register int distx = (fx & 0x0000ffff) >> 8;
- register int idistx = 256 - distx;
+ int distx = (fx & 0x0000ffff) >> 8;
+ int idistx = 256 - distx;
int rb = ((intermediate_buffer[0][x1] * idistx + intermediate_buffer[0][x2] * distx) >> 8) & 0xff00ff;
int ag = (intermediate_buffer[1][x1] * idistx + intermediate_buffer[1][x2] * distx) & 0xff00ff00;
*b = rb | ag;
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index f80bfcb..a81c173 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -2065,7 +2065,7 @@ do { \
/* Duff's device */ \
uint *_d = (uint*)(dest) + length; \
const uint *_s = (uint*)(src) + length; \
- register int n = ((length) + 7) / 8; \
+ int n = ((length) + 7) / 8; \
switch ((length) & 0x07) \
{ \
case 0: do { *--_d = *--_s; \
@@ -2085,7 +2085,7 @@ do { \
/* Duff's device */ \
ushort *_d = (ushort*)(dest); \
const ushort *_s = (ushort*)(src); \
- register int n = ((length) + 7) / 8; \
+ int n = ((length) + 7) / 8; \
switch ((length) & 0x07) \
{ \
case 0: do { *_d++ = *_s++; \
diff --git a/src/gui/painting/qpolygon.cpp b/src/gui/painting/qpolygon.cpp
index ab69bba..dafc2ad 100644
--- a/src/gui/painting/qpolygon.cpp
+++ b/src/gui/painting/qpolygon.cpp
@@ -217,8 +217,8 @@ void QPolygon::translate(int dx, int dy)
if (dx == 0 && dy == 0)
return;
- register QPoint *p = data();
- register int i = size();
+ QPoint *p = data();
+ int i = size();
QPoint pt(dx, dy);
while (i--) {
*p += pt;
@@ -446,7 +446,7 @@ QRect QPolygon::boundingRect() const
{
if (isEmpty())
return QRect(0, 0, 0, 0);
- register const QPoint *pd = constData();
+ const QPoint *pd = constData();
int minx, maxx, miny, maxy;
minx = maxx = pd->x();
miny = maxy = pd->y();
@@ -603,8 +603,8 @@ void QPolygonF::translate(const QPointF &offset)
if (offset.isNull())
return;
- register QPointF *p = data();
- register int i = size();
+ QPointF *p = data();
+ int i = size();
while (i--) {
*p += offset;
++p;
@@ -664,7 +664,7 @@ QRectF QPolygonF::boundingRect() const
{
if (isEmpty())
return QRectF(0, 0, 0, 0);
- register const QPointF *pd = constData();
+ const QPointF *pd = constData();
qreal minx, maxx, miny, maxy;
minx = maxx = pd->x();
miny = maxy = pd->y();
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index 855baa4..bd39d4a 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -1633,14 +1633,14 @@ static QRegionPrivate qrp;
QRegion::QRegionData QRegion::shared_empty = {Q_BASIC_ATOMIC_INITIALIZER(1), &qrp};
#endif
-typedef void (*OverlapFunc)(register QRegionPrivate &dest, register const QRect *r1, const QRect *r1End,
- register const QRect *r2, const QRect *r2End, register int y1, register int y2);
-typedef void (*NonOverlapFunc)(register QRegionPrivate &dest, register const QRect *r, const QRect *rEnd,
- register int y1, register int y2);
+typedef void (*OverlapFunc)(QRegionPrivate &dest, const QRect *r1, const QRect *r1End,
+ const QRect *r2, const QRect *r2End, int y1, int y2);
+typedef void (*NonOverlapFunc)(QRegionPrivate &dest, const QRect *r, const QRect *rEnd,
+ int y1, int y2);
static bool EqualRegion(const QRegionPrivate *r1, const QRegionPrivate *r2);
static void UnionRegion(const QRegionPrivate *reg1, const QRegionPrivate *reg2, QRegionPrivate &dest);
-static void miRegionOp(register QRegionPrivate &dest, const QRegionPrivate *reg1, const QRegionPrivate *reg2,
+static void miRegionOp(QRegionPrivate &dest, const QRegionPrivate *reg1, const QRegionPrivate *reg2,
OverlapFunc overlapFunc, NonOverlapFunc nonOverlap1Func,
NonOverlapFunc nonOverlap2Func);
@@ -1837,7 +1837,7 @@ SOFTWARE.
*/
/* $XFree86: xc/lib/X11/Region.c,v 1.1.1.2.2.2 1998/10/04 15:22:50 hohndel Exp $ */
-static void UnionRectWithRegion(register const QRect *rect, const QRegionPrivate *source,
+static void UnionRectWithRegion(const QRect *rect, const QRegionPrivate *source,
QRegionPrivate &dest)
{
if (rect->isEmpty())
@@ -1872,9 +1872,9 @@ static void UnionRectWithRegion(register const QRect *rect, const QRegionPrivate
*/
static void miSetExtents(QRegionPrivate &dest)
{
- register const QRect *pBox,
+ const QRect *pBox,
*pBoxEnd;
- register QRect *pExtents;
+ QRect *pExtents;
dest.innerRect.setCoords(0, 0, -1, -1);
dest.innerArea = -1;
@@ -1919,11 +1919,11 @@ static void miSetExtents(QRegionPrivate &dest)
added by raymond
*/
-static void OffsetRegion(register QRegionPrivate &region, register int x, register int y)
+static void OffsetRegion(QRegionPrivate &region, int x, int y)
{
if (region.rects.size()) {
- register QRect *pbox = region.rects.data();
- register int nbox = region.numRects;
+ QRect *pbox = region.rects.data();
+ int nbox = region.numRects;
while (nbox--) {
pbox->translate(x, y);
@@ -1950,12 +1950,12 @@ static void OffsetRegion(register QRegionPrivate &region, register int x, regist
*
*-----------------------------------------------------------------------
*/
-static void miIntersectO(register QRegionPrivate &dest, register const QRect *r1, const QRect *r1End,
- register const QRect *r2, const QRect *r2End, int y1, int y2)
+static void miIntersectO(QRegionPrivate &dest, const QRect *r1, const QRect *r1End,
+ const QRect *r2, const QRect *r2End, int y1, int y2)
{
- register int x1;
- register int x2;
- register QRect *pNextRect;
+ int x1;
+ int x2;
+ QRect *pNextRect;
pNextRect = dest.rects.data() + dest.numRects;
@@ -2015,11 +2015,11 @@ static void miIntersectO(register QRegionPrivate &dest, register const QRect *r1
*
*-----------------------------------------------------------------------
*/
-static int miCoalesce(register QRegionPrivate &dest, int prevStart, int curStart)
+static int miCoalesce(QRegionPrivate &dest, int prevStart, int curStart)
{
- register QRect *pPrevBox; /* Current box in previous band */
- register QRect *pCurBox; /* Current box in current band */
- register QRect *pRegEnd; /* End of region */
+ QRect *pPrevBox; /* Current box in previous band */
+ QRect *pCurBox; /* Current box in current band */
+ QRect *pRegEnd; /* End of region */
int curNumRects; /* Number of rectangles in current band */
int prevNumRects; /* Number of rectangles in previous band */
int bandY1; /* Y1 coordinate for current band */
@@ -2144,21 +2144,21 @@ static int miCoalesce(register QRegionPrivate &dest, int prevStart, int curStart
*
*-----------------------------------------------------------------------
*/
-static void miRegionOp(register QRegionPrivate &dest,
+static void miRegionOp(QRegionPrivate &dest,
const QRegionPrivate *reg1, const QRegionPrivate *reg2,
OverlapFunc overlapFunc, NonOverlapFunc nonOverlap1Func,
NonOverlapFunc nonOverlap2Func)
{
- register const QRect *r1; // Pointer into first region
- register const QRect *r2; // Pointer into 2d region
+ const QRect *r1; // Pointer into first region
+ const QRect *r2; // Pointer into 2d region
const QRect *r1End; // End of 1st region
const QRect *r2End; // End of 2d region
- register int ybot; // Bottom of intersection
- register int ytop; // Top of intersection
+ int ybot; // Bottom of intersection
+ int ytop; // Top of intersection
int prevBand; // Index of start of previous band in dest
int curBand; // Index of start of current band in dest
- register const QRect *r1BandEnd; // End of current band in r1
- register const QRect *r2BandEnd; // End of current band in r2
+ const QRect *r1BandEnd; // End of current band in r1
+ const QRect *r2BandEnd; // End of current band in r2
int top; // Top of non-overlapping band
int bot; // Bottom of non-overlapping band
@@ -2360,10 +2360,10 @@ static void miRegionOp(register QRegionPrivate &dest,
*-----------------------------------------------------------------------
*/
-static void miUnionNonO(register QRegionPrivate &dest, register const QRect *r, const QRect *rEnd,
- register int y1, register int y2)
+static void miUnionNonO(QRegionPrivate &dest, const QRect *r, const QRect *rEnd,
+ int y1, int y2)
{
- register QRect *pNextRect;
+ QRect *pNextRect;
pNextRect = dest.rects.data() + dest.numRects;
@@ -2396,10 +2396,10 @@ static void miUnionNonO(register QRegionPrivate &dest, register const QRect *r,
*-----------------------------------------------------------------------
*/
-static void miUnionO(register QRegionPrivate &dest, register const QRect *r1, const QRect *r1End,
- register const QRect *r2, const QRect *r2End, register int y1, register int y2)
+static void miUnionO(QRegionPrivate &dest, const QRect *r1, const QRect *r1End,
+ const QRect *r2, const QRect *r2End, int y1, int y2)
{
- register QRect *pNextRect;
+ QRect *pNextRect;
pNextRect = dest.rects.data() + dest.numRects;
@@ -2485,10 +2485,10 @@ static void UnionRegion(const QRegionPrivate *reg1, const QRegionPrivate *reg2,
*-----------------------------------------------------------------------
*/
-static void miSubtractNonO1(register QRegionPrivate &dest, register const QRect *r,
- const QRect *rEnd, register int y1, register int y2)
+static void miSubtractNonO1(QRegionPrivate &dest, const QRect *r,
+ const QRect *rEnd, int y1, int y2)
{
- register QRect *pNextRect;
+ QRect *pNextRect;
pNextRect = dest.rects.data() + dest.numRects;
@@ -2519,11 +2519,11 @@ static void miSubtractNonO1(register QRegionPrivate &dest, register const QRect
*-----------------------------------------------------------------------
*/
-static void miSubtractO(register QRegionPrivate &dest, register const QRect *r1, const QRect *r1End,
- register const QRect *r2, const QRect *r2End, register int y1, register int y2)
+static void miSubtractO(QRegionPrivate &dest, const QRect *r1, const QRect *r1End,
+ const QRect *r2, const QRect *r2End, int y1, int y2)
{
- register QRect *pNextRect;
- register int x1;
+ QRect *pNextRect;
+ int x1;
x1 = r1->left();
@@ -2621,7 +2621,7 @@ static void miSubtractO(register QRegionPrivate &dest, register const QRect *r1,
*/
static void SubtractRegion(QRegionPrivate *regM, QRegionPrivate *regS,
- register QRegionPrivate &dest)
+ QRegionPrivate &dest)
{
Q_ASSERT(!isEmptyHelper(regM));
Q_ASSERT(!isEmptyHelper(regS));
@@ -2716,12 +2716,12 @@ static bool PointInRegion(QRegionPrivate *pRegion, int x, int y)
return false;
}
-static bool RectInRegion(register QRegionPrivate *region, int rx, int ry, uint rwidth, uint rheight)
+static bool RectInRegion(QRegionPrivate *region, int rx, int ry, uint rwidth, uint rheight)
{
- register const QRect *pbox;
- register const QRect *pboxEnd;
+ const QRect *pbox;
+ const QRect *pboxEnd;
QRect rect(rx, ry, rwidth, rheight);
- register QRect *prect = &rect;
+ QRect *prect = &rect;
int partIn, partOut;
if (!region || region->numRects == 0 || !EXTENTCHECK(&region->extents, prect))
@@ -3142,8 +3142,8 @@ SOFTWARE.
static void InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
ScanLineListBlock **SLLBlock, int *iSLLBlock)
{
- register EdgeTableEntry *start, *prev;
- register ScanLineList *pSLL, *pPrevSLL;
+ EdgeTableEntry *start, *prev;
+ ScanLineList *pSLL, *pPrevSLL;
ScanLineListBlock *tmpSLLBlock;
/*
@@ -3220,11 +3220,11 @@ static void InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
*
*/
-static void CreateETandAET(register int count, register const QPoint *pts,
- EdgeTable *ET, EdgeTableEntry *AET, register EdgeTableEntry *pETEs,
+static void CreateETandAET(int count, const QPoint *pts,
+ EdgeTable *ET, EdgeTableEntry *AET, EdgeTableEntry *pETEs,
ScanLineListBlock *pSLLBlock)
{
- register const QPoint *top,
+ const QPoint *top,
*bottom,
*PrevPt,
*CurrPt;
@@ -3307,10 +3307,10 @@ static void CreateETandAET(register int count, register const QPoint *pts,
*
*/
-static void loadAET(register EdgeTableEntry *AET, register EdgeTableEntry *ETEs)
+static void loadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs)
{
- register EdgeTableEntry *pPrevAET;
- register EdgeTableEntry *tmp;
+ EdgeTableEntry *pPrevAET;
+ EdgeTableEntry *tmp;
pPrevAET = AET;
AET = AET->next;
@@ -3351,11 +3351,11 @@ static void loadAET(register EdgeTableEntry *AET, register EdgeTableEntry *ETEs)
* V-------------------> V---> ...
*
*/
-static void computeWAET(register EdgeTableEntry *AET)
+static void computeWAET(EdgeTableEntry *AET)
{
- register EdgeTableEntry *pWETE;
- register int inside = 1;
- register int isInside = 0;
+ EdgeTableEntry *pWETE;
+ int inside = 1;
+ int isInside = 0;
AET->nextWETE = 0;
pWETE = AET;
@@ -3385,12 +3385,12 @@ static void computeWAET(register EdgeTableEntry *AET)
*
*/
-static int InsertionSort(register EdgeTableEntry *AET)
+static int InsertionSort(EdgeTableEntry *AET)
{
- register EdgeTableEntry *pETEchase;
- register EdgeTableEntry *pETEinsert;
- register EdgeTableEntry *pETEchaseBackTMP;
- register int changed = 0;
+ EdgeTableEntry *pETEchase;
+ EdgeTableEntry *pETEinsert;
+ EdgeTableEntry *pETEchaseBackTMP;
+ int changed = 0;
AET = AET->next;
while (AET) {
@@ -3418,9 +3418,9 @@ static int InsertionSort(register EdgeTableEntry *AET)
/*
* Clean up our act.
*/
-static void FreeStorage(register ScanLineListBlock *pSLLBlock)
+static void FreeStorage(ScanLineListBlock *pSLLBlock)
{
- register ScanLineListBlock *tmpSLLBlock;
+ ScanLineListBlock *tmpSLLBlock;
while (pSLLBlock) {
tmpSLLBlock = pSLLBlock->next;
@@ -3484,7 +3484,7 @@ static inline void flushRow(const QRegionSpan *spans, int y, int numSpans, QRegi
* stack by the calling procedure.
*
*/
-static void PtsToRegion(register int numFullPtBlocks, register int iCurPtBlock,
+static void PtsToRegion(int numFullPtBlocks, int iCurPtBlock,
POINTBLOCK *FirstPtBlock, QRegionPrivate *reg)
{
int lastRow = 0;
@@ -3560,12 +3560,12 @@ static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule)
//int rule; /* winding rule */
{
QRegionPrivate *region;
- register EdgeTableEntry *pAET; /* Active Edge Table */
- register int y; /* current scanline */
- register int iPts = 0; /* number of pts in buffer */
- register EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/
- register ScanLineList *pSLL; /* current scanLineList */
- register QPoint *pts; /* output buffer */
+ EdgeTableEntry *pAET; /* Active Edge Table */
+ int y; /* current scanline */
+ int iPts = 0; /* number of pts in buffer */
+ EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/
+ ScanLineList *pSLL; /* current scanLineList */
+ QPoint *pts; /* output buffer */
EdgeTableEntry *pPrevAET; /* ptr to previous AET */
EdgeTable ET; /* header node for ET */
EdgeTableEntry AET; /* header node for AET */
diff --git a/src/network/access/qnetworkcookie_p.h b/src/network/access/qnetworkcookie_p.h
index 6efc69c..feeffca 100644
--- a/src/network/access/qnetworkcookie_p.h
+++ b/src/network/access/qnetworkcookie_p.h
@@ -73,7 +73,7 @@ public:
bool httpOnly;
};
-static inline bool isLWS(register char c)
+static inline bool isLWS(char c)
{
return c == ' ' || c == '\t' || c == '\r' || c == '\n';
}
diff --git a/src/network/socket/qnet_unix_p.h b/src/network/socket/qnet_unix_p.h
index dc50abf..f79ec34 100644
--- a/src/network/socket/qnet_unix_p.h
+++ b/src/network/socket/qnet_unix_p.h
@@ -84,7 +84,7 @@ static inline int qt_safe_socket(int domain, int type, int protocol, int flags =
{
Q_ASSERT((flags & ~O_NONBLOCK) == 0);
- register int fd;
+ int fd;
#if defined(SOCK_CLOEXEC) && defined(SOCK_NONBLOCK)
int newtype = type | SOCK_CLOEXEC;
if (flags & O_NONBLOCK)
@@ -112,7 +112,7 @@ static inline int qt_safe_accept(int s, struct sockaddr *addr, QT_SOCKLEN_T *add
{
Q_ASSERT((flags & ~O_NONBLOCK) == 0);
- register int fd;
+ int fd;
#if QT_UNIX_SUPPORTS_THREADSAFE_CLOEXEC && defined(SOCK_CLOEXEC) && defined(SOCK_NONBLOCK)
// use accept4
int sockflags = SOCK_CLOEXEC;
@@ -144,7 +144,7 @@ static inline int qt_safe_listen(int s, int backlog)
static inline int qt_safe_connect(int sockfd, const struct sockaddr *addr, QT_SOCKLEN_T addrlen)
{
- register int ret;
+ int ret;
// Solaris e.g. expects a non-const 2nd parameter
EINTR_LOOP(ret, QT_SOCKET_CONNECT(sockfd, const_cast<struct sockaddr *>(addr), addrlen));
return ret;
@@ -192,7 +192,7 @@ static inline int qt_safe_sendto(int sockfd, const void *buf, size_t len, int fl
qt_ignore_sigpipe();
#endif
- register int ret;
+ int ret;
#ifdef Q_OS_VXWORKS
EINTR_LOOP(ret, ::sendto(sockfd, (char *) buf, len, flags, (struct sockaddr *) to, tolen));
#else
diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp
index 77147b2..1a88605 100644
--- a/src/plugins/imageformats/ico/qicohandler.cpp
+++ b/src/plugins/imageformats/ico/qicohandler.cpp
@@ -448,7 +448,7 @@ void ICOReader::read4BitBMP(QImage & image)
image = QImage();
break;
}
- register uchar *p = image.scanLine(h);
+ uchar *p = image.scanLine(h);
uchar *b = buf;
for (int i=0; i<icoAttrib.w/2; i++) { // convert nibbles to bytes
*p++ = *b >> 4;
@@ -487,7 +487,7 @@ void ICOReader::read16_24_32BMP(QImage & image)
{
if (iod) {
int h = icoAttrib.h;
- register QRgb *p;
+ QRgb *p;
QRgb *end;
uchar *buf = new uchar[image.bytesPerLine()];
int bpl = ((icoAttrib.w*icoAttrib.nbits+31)/32)*4;