diff options
author | David Faure <faure@kde.org> | 2009-09-13 08:18:57 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-09-13 08:18:57 (GMT) |
commit | b2f2967411bcb23a807f6a17b042b4c58701af95 (patch) | |
tree | 7db490cf7846973e8b9850a87a0abd0e54944c0c /src/corelib/io | |
parent | 139cffbfe1598b32ffe658968694d163dc53e3dd (diff) | |
download | Qt-b2f2967411bcb23a807f6a17b042b4c58701af95.zip Qt-b2f2967411bcb23a807f6a17b042b4c58701af95.tar.gz Qt-b2f2967411bcb23a807f6a17b042b4c58701af95.tar.bz2 |
Fix -Wconversion warnings where possible.
In order to detect "int foo = myQReal" mistakes, one needs to compile with -Wconversion.
However that flag triggers many warnings inside Qt. This commit fixes many of them, like
qchar.h:295: warning: conversion to 'ushort' from 'unsigned int' may alter its value
qglobal.h:1026: warning: conversion to 'qreal' from 'qint64' may alter its value
qbytearray.h:441: warning: conversion to 'char' from 'int' may alter its value
Other warnings remain (such as those coming from bitfields)
Merge-request: 1460
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qiodevice.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qiodevice.h b/src/corelib/io/qiodevice.h index adb8f1c..60ca74c 100644 --- a/src/corelib/io/qiodevice.h +++ b/src/corelib/io/qiodevice.h @@ -198,7 +198,7 @@ public: inline QT3_SUPPORT qint64 writeBlock(const QByteArray &data) { return write(data); } inline QT3_SUPPORT int getch() { char c; return getChar(&c) ? int(uchar(c)) : -1; } - inline QT3_SUPPORT int putch(int c) { return putChar(c) ? int(uchar(c)) : -1; } + inline QT3_SUPPORT int putch(int c) { return putChar(char(c)) ? int(uchar(c)) : -1; } inline QT3_SUPPORT int ungetch(int c) { ungetChar(uchar(c)); return c; } #endif }; |