VNC plugin: explicitly cast int to uint16_t before calling htons
Otherwise there is a -Werror=narrowing error on big-endian
architectures (where htons does nothing).
Task-number: QTBUG-68390
Change-Id: Idb204a81aaedb9f4fde1d5fae406da36c7a1953e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry-picked from b206d1c808
)
This commit is contained in:
parent
43f5377fad
commit
f2862b4d5d
@ -552,9 +552,9 @@ void QVncClientCursor::write(QVncClient *client) const
|
||||
{
|
||||
const quint16 tmp[6] = { htons(0),
|
||||
htons(1),
|
||||
htons(hotspot.x()), htons(hotspot.y()),
|
||||
htons(cursor.width()),
|
||||
htons(cursor.height()) };
|
||||
htons(uint16_t(hotspot.x())), htons(uint16_t(hotspot.y())),
|
||||
htons(uint16_t(cursor.width())),
|
||||
htons(uint16_t(cursor.height())) };
|
||||
socket->write((char*)tmp, sizeof(tmp));
|
||||
|
||||
const qint32 encoding = qToBigEndian(-239);
|
||||
|
Loading…
Reference in New Issue
Block a user