summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@qt.io>2022-03-04 11:05:14 +0200
committerPasi Petäjäjärvi <pasi.petajajarvi@qt.io>2022-03-09 14:03:21 +0200
commitb680ae34423243a69ca48b2db399079080189e79 (patch)
treec0472245df17d826ec576def3eeb4b9dfee2022b /src/plugins/platforms/qnx
parent2edc0025fa6d5a0f9c1c0d3811fac4bd8f3831c9 (diff)
QNX: Fix compiler warnings by using correct format specifiers
Also change qt_safe_read to use correct return value. warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Wformat=] warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=] Pick-to: 6.2 6.3 Task-number: QTBUG-101382 Change-Id: I1ee42b84a477451a98838c8cea3cca7c73f7cbaa Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
Diffstat (limited to 'src/plugins/platforms/qnx')
-rw-r--r--src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp
index 0d7bf09599..08119b9c06 100644
--- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp
+++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp
@@ -134,7 +134,7 @@ bool QQnxVirtualKeyboardPps::connect()
m_buffer = new char[ms_bufferSize];
if (Q_UNLIKELY(!m_buffer)) {
- qCritical("QQnxVirtualKeyboard: Unable to allocate buffer of %d bytes. "
+ qCritical("QQnxVirtualKeyboard: Unable to allocate buffer of %zu bytes. "
"Size is unavailable.", ms_bufferSize);
return false;
}
@@ -162,9 +162,9 @@ bool QQnxVirtualKeyboardPps::queryPPSInfo()
void QQnxVirtualKeyboardPps::ppsDataReady()
{
- ssize_t nread = qt_safe_read(m_fd, m_buffer, ms_bufferSize - 1);
+ qint64 nread = qt_safe_read(m_fd, m_buffer, ms_bufferSize - 1);
- qVirtualKeyboardDebug("keyboardMessage size: %zd", nread);
+ qVirtualKeyboardDebug("keyboardMessage size: %lld", nread);
if (nread < 0){
connect(); // reconnect
return;
@@ -177,7 +177,7 @@ void QQnxVirtualKeyboardPps::ppsDataReady()
// nread is the real space necessary, not the amount read.
if (Q_UNLIKELY(static_cast<size_t>(nread) > ms_bufferSize - 1)) {
- qCritical("QQnxVirtualKeyboard: Keyboard buffer size too short; need %u.", nread + 1);
+ qCritical("QQnxVirtualKeyboard: Keyboard buffer size too short; need %lld.", nread + 1);
connect(); // reconnect
return;
}