fix some compiler warnings

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-07-04 11:26:03 +00:00
parent a12b922054
commit 4839205973
6 changed files with 18 additions and 18 deletions

View file

@ -161,7 +161,7 @@ MD5Final(struct MD5Context *ctx, md5byte digest[16])
static void
MD5Transform(UWORD32 buf[4], UWORD32 const in[16])
{
register UWORD32 a, b, c, d;
UWORD32 a, b, c, d;
a = buf[0];
b = buf[1];

View file

@ -2969,7 +2969,7 @@ void qt_nameprep(QString *source, int from)
const QChar *e = src + source->size();
for ( ; out < e; ++out) {
register ushort uc = out->unicode();
ushort uc = out->unicode();
if (uc >= 0x80) {
break;
} else if (uc >= 'A' && uc <= 'Z') {
@ -3062,7 +3062,7 @@ bool qt_check_std3rules(const QChar *uc, int len)
return false;
for (int i = 0; i < len; ++i) {
register ushort c = uc[i].unicode();
ushort c = uc[i].unicode();
if (c == '-' && (i == 0 || i == len - 1))
return false;
@ -3360,7 +3360,7 @@ static QString qt_ACE_do(const QString &domain, AceOperation op)
const QChar *in = domain.constData() + lastIdx;
const QChar *e = in + labelLength;
for (; in < e; ++in, ++out) {
register ushort uc = in->unicode();
ushort uc = in->unicode();
if (uc > 0x7f)
simple = false;
if (uc >= 'A' && uc <= 'Z')
@ -3389,7 +3389,7 @@ static QString qt_ACE_do(const QString &domain, AceOperation op)
// That means we need one or two temporaries
qt_nameprep(&result, prevLen);
labelLength = result.length() - prevLen;
register int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes
int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes
aceForm.resize(0);
if (toReserve > aceForm.capacity())
aceForm.reserve(toReserve);

View file

@ -309,21 +309,21 @@ static inline int qt_safe_close(int fd)
static inline int qt_safe_execve(const char *filename, char *const argv[],
char *const envp[])
{
register int ret;
int ret;
EINTR_LOOP(ret, ::execve(filename, argv, envp));
return ret;
}
static inline int qt_safe_execv(const char *path, char *const argv[])
{
register int ret;
int ret;
EINTR_LOOP(ret, ::execv(path, argv));
return ret;
}
static inline int qt_safe_execvp(const char *file, char *const argv[])
{
register int ret;
int ret;
EINTR_LOOP(ret, ::execvp(file, argv));
return ret;
}
@ -332,7 +332,7 @@ static inline int qt_safe_execvp(const char *file, char *const argv[])
#ifndef Q_OS_VXWORKS // no processes on VxWorks
static inline pid_t qt_safe_waitpid(pid_t pid, int *status, int options)
{
register int ret;
int ret;
EINTR_LOOP(ret, ::waitpid(pid, status, options));
return ret;
}

View file

@ -834,7 +834,7 @@ bool QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject *receiv
if (receiver->d_func()->threadData == this->threadData) {
// application event filters are only called for objects in the GUI thread
for (int i = 0; i < eventFilters.size(); ++i) {
register QObject *obj = eventFilters.at(i);
QObject *obj = eventFilters.at(i);
if (!obj)
continue;
if (obj->d_func()->threadData != threadData) {
@ -853,7 +853,7 @@ bool QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject *receiver, Q
Q_Q(QCoreApplication);
if (receiver != q) {
for (int i = 0; i < receiver->d_func()->eventFilters.size(); ++i) {
register QObject *obj = receiver->d_func()->eventFilters.at(i);
QObject *obj = receiver->d_func()->eventFilters.at(i);
if (!obj)
continue;
if (obj->d_func()->threadData != receiver->d_func()->threadData) {

View file

@ -432,7 +432,7 @@ void QTimerInfoList::timerInsert(QTimerInfo *ti)
{
int index = size();
while (index--) {
register const QTimerInfo * const t = at(index);
const QTimerInfo * const t = at(index);
if (!(ti->timeout < t->timeout))
break;
}
@ -446,7 +446,7 @@ void QTimerInfoList::timerRepair(const timeval &diff)
{
// repair all timers
for (int i = 0; i < size(); ++i) {
register QTimerInfo *t = at(i);
QTimerInfo *t = at(i);
t->timeout = t->timeout + diff;
}
}
@ -501,7 +501,7 @@ bool QTimerInfoList::unregisterTimer(int timerId)
{
// set timer inactive
for (int i = 0; i < count(); ++i) {
register QTimerInfo *t = at(i);
QTimerInfo *t = at(i);
if (t->id == timerId) {
// found it
removeAt(i);
@ -527,7 +527,7 @@ bool QTimerInfoList::unregisterTimers(QObject *object)
if (isEmpty())
return false;
for (int i = 0; i < count(); ++i) {
register QTimerInfo *t = at(i);
QTimerInfo *t = at(i);
if (t->obj == object) {
// object found
removeAt(i);
@ -552,7 +552,7 @@ QList<QPair<int, int> > QTimerInfoList::registeredTimers(QObject *object) const
{
QList<QPair<int, int> > list;
for (int i = 0; i < count(); ++i) {
register const QTimerInfo * const t = at(i);
const QTimerInfo * const t = at(i);
if (t->obj == object)
list << QPair<int, int>(t->id, t->interval.tv_sec * 1000 + t->interval.tv_usec / 1000);
}

View file

@ -329,7 +329,7 @@ bool QSystemSemaphorePrivate::modifySemaphore(int count)
#endif
// rollback changes to preserve the SysV semaphore behavior
for ( ; cnt < count; ++cnt) {
register int res;
int res;
EINTR_LOOP(res, sem_wait(semaphore));
}
return false;
@ -337,7 +337,7 @@ bool QSystemSemaphorePrivate::modifySemaphore(int count)
--cnt;
} while (cnt > 0);
} else {
register int res;
int res;
EINTR_LOOP(res, sem_wait(semaphore));
if (res == -1) {
// If the semaphore was removed be nice and create it and then modifySemaphore again