QProcess: fix warnings with QPROCESS_DEBUG defined
The warnings were: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=] (2x) Change-Id: If8c2e8fab7388cb4aa7d6e7ceb5faee531e16006 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
14511471df
commit
df6c4f9a65
@ -761,7 +761,7 @@ qint64 QProcessPrivate::bytesAvailableInChannel(const Channel *channel) const
|
|||||||
if (::ioctl(channel->pipe[0], FIONREAD, (char *) &nbytes) >= 0)
|
if (::ioctl(channel->pipe[0], FIONREAD, (char *) &nbytes) >= 0)
|
||||||
available = (qint64) nbytes;
|
available = (qint64) nbytes;
|
||||||
#if defined (QPROCESS_DEBUG)
|
#if defined (QPROCESS_DEBUG)
|
||||||
qDebug("QProcessPrivate::bytesAvailableInChannel(%d) == %lld", channel - &stdinChannel, available);
|
qDebug("QProcessPrivate::bytesAvailableInChannel(%d) == %lld", int(channel - &stdinChannel), available);
|
||||||
#endif
|
#endif
|
||||||
return available;
|
return available;
|
||||||
}
|
}
|
||||||
@ -773,7 +773,7 @@ qint64 QProcessPrivate::readFromChannel(const Channel *channel, char *data, qint
|
|||||||
#if defined QPROCESS_DEBUG
|
#if defined QPROCESS_DEBUG
|
||||||
int save_errno = errno;
|
int save_errno = errno;
|
||||||
qDebug("QProcessPrivate::readFromChannel(%d, %p \"%s\", %lld) == %lld",
|
qDebug("QProcessPrivate::readFromChannel(%d, %p \"%s\", %lld) == %lld",
|
||||||
channel - &stdinChannel,
|
int(channel - &stdinChannel),
|
||||||
data, qt_prettyDebug(data, bytesRead, 16).constData(), maxlen, bytesRead);
|
data, qt_prettyDebug(data, bytesRead, 16).constData(), maxlen, bytesRead);
|
||||||
errno = save_errno;
|
errno = save_errno;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user