From c63af1a307bdde0ba12906550aa7167d8c3be006 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 18 Aug 2015 15:53:13 +0200 Subject: Fix warning about unused variable on Non-Windows OS. qserialport.cpp:1373:32: warning: unused variable 'd' [-Wunused-variable] Change-Id: I31adafe0089d13362b4a7c0efeddfbfb138f9415 Reviewed-by: Sergey Belyashov Reviewed-by: Denis Shienkov --- src/serialport/qserialport.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/serialport/qserialport.cpp b/src/serialport/qserialport.cpp index 9ed1c5f..956c899 100644 --- a/src/serialport/qserialport.cpp +++ b/src/serialport/qserialport.cpp @@ -1370,8 +1370,6 @@ bool QSerialPort::isBreakEnabled() const // method will be called. qint64 QSerialPort::readData(char *data, qint64 maxSize) { - Q_D(QSerialPort); - Q_UNUSED(data); Q_UNUSED(maxSize); @@ -1380,6 +1378,7 @@ qint64 QSerialPort::readData(char *data, qint64 maxSize) // in case we have a limited read buffer size. Because the read notification can // be stalled since Windows do not re-triggered an EV_RXCHAR event if a driver's // buffer has a remainder of data ready to read until a new data will be received. + Q_D(QSerialPort); if (d->readBufferMaxSize || d->flowControl == QSerialPort::HardwareControl) d->startAsyncRead(); #endif -- cgit v1.2.1