Fix build in C++0x mode
This fixes compiler errors (gcc 4.6 -std=gnu++0x on x86_64 Linux):
embedded/qwslock.cpp: In function `bool forceLock(int, int, int)':
embedded/qwslock.cpp:121:39: error: narrowing conversion of `semNum'
from `int' to `short unsigned int' inside { } [-fpermissive]
(and equivalent errors in other lines/files)
See
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf
Section 8.5.4/6
Change-Id: I2cbac5482b87f33287a416af5a5c9bde621720bc
Reviewed-By: Olivier Goffart
Merge-Request: 1240
Reviewed-on: http://codereview.qt.nokia.com/275
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
bb10
parent
a8814fcb69
commit
15871d606a
|
|
@ -261,7 +261,7 @@ public:
|
|||
usleep(50000);
|
||||
QT_WRITE(fd,"@EeI!",5);
|
||||
usleep(10000);
|
||||
static const char ibuf[] = { 246, 244 };
|
||||
static const unsigned char ibuf[] = { 246, 244 };
|
||||
QT_WRITE(fd,ibuf,1);
|
||||
QT_WRITE(fd,ibuf+1,1);
|
||||
if (tcflush(fd,TCIOFLUSH) == -1) {
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ QWSLock::~QWSLock()
|
|||
QWSSignalHandler::instance()->removeSemaphore(semId);
|
||||
}
|
||||
|
||||
static bool forceLock(int semId, int semNum, int)
|
||||
static bool forceLock(int semId, unsigned short semNum, int)
|
||||
{
|
||||
int ret;
|
||||
do {
|
||||
|
|
@ -135,7 +135,7 @@ static bool forceLock(int semId, int semNum, int)
|
|||
return (ret != -1);
|
||||
}
|
||||
|
||||
static bool up(int semId, int semNum)
|
||||
static bool up(int semId, unsigned short semNum)
|
||||
{
|
||||
int ret;
|
||||
do {
|
||||
|
|
@ -148,7 +148,7 @@ static bool up(int semId, int semNum)
|
|||
return (ret != -1);
|
||||
}
|
||||
|
||||
static bool down(int semId, int semNum)
|
||||
static bool down(int semId, unsigned short semNum)
|
||||
{
|
||||
int ret;
|
||||
do {
|
||||
|
|
@ -161,7 +161,7 @@ static bool down(int semId, int semNum)
|
|||
return (ret != -1);
|
||||
}
|
||||
|
||||
static int getValue(int semId, int semNum)
|
||||
static int getValue(int semId, unsigned short semNum)
|
||||
{
|
||||
int ret;
|
||||
do {
|
||||
|
|
@ -210,7 +210,7 @@ void QWSLock::unlock(LockType type)
|
|||
return;
|
||||
}
|
||||
|
||||
const int semNum = type;
|
||||
const unsigned short semNum = type;
|
||||
int ret;
|
||||
do {
|
||||
sembuf sops = {semNum, 1, 0};
|
||||
|
|
|
|||
|
|
@ -879,10 +879,10 @@ QStringList QFontDatabasePrivate::addTTFile(const QByteArray &file, const QByteA
|
|||
TT_OS2 *os2 = (TT_OS2 *)FT_Get_Sfnt_Table(face, ft_sfnt_os2);
|
||||
if (os2) {
|
||||
quint32 unicodeRange[4] = {
|
||||
os2->ulUnicodeRange1, os2->ulUnicodeRange2, os2->ulUnicodeRange3, os2->ulUnicodeRange4
|
||||
static_cast<quint32>(os2->ulUnicodeRange1), static_cast<quint32>(os2->ulUnicodeRange2), static_cast<quint32>(os2->ulUnicodeRange3), static_cast<quint32>(os2->ulUnicodeRange4)
|
||||
};
|
||||
quint32 codePageRange[2] = {
|
||||
os2->ulCodePageRange1, os2->ulCodePageRange2
|
||||
static_cast<quint32>(os2->ulCodePageRange1), static_cast<quint32>(os2->ulCodePageRange2)
|
||||
};
|
||||
|
||||
writingSystems = qt_determine_writing_systems_from_truetype_bits(unicodeRange, codePageRange);
|
||||
|
|
|
|||
Loading…
Reference in New Issue