Treat warnings as errors and fix existing warnings

This commit is contained in:
Srivats P 2018-04-20 20:50:51 +05:30
parent 2867764c56
commit a16eefbff4
12 changed files with 13 additions and 9 deletions

View File

@ -114,6 +114,7 @@ QMAKE_DISTCLEAN += object_script.*
include(../install.pri)
include(../version.pri)
include(../options.pri)
INCLUDEPATH += "../extra/modeltest"
greaterThan(QT_MINOR_VERSION, 6) {

View File

@ -553,7 +553,7 @@ void PortsWindow::updatePortViewActions(const QModelIndex& currentIndex)
goto _EXIT;
}
qDebug("currentChanged %llx", current.internalId());
qDebug("currentChanged %p", (void*)current.internalId());
if (plm->isPortGroup(current))
{

View File

@ -56,7 +56,7 @@ QLineEdit:enabled[inputMask = "HH HH HH HH HH HH; "] { background-colo
<property name="title">
<string>Basics</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayout2">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">

View File

@ -57,12 +57,12 @@ StreamStatsModel::StreamStatsModel(QObject *parent)
clearStats();
}
int StreamStatsModel::rowCount(const QModelIndex &parent) const
int StreamStatsModel::rowCount(const QModelIndex &/*parent*/) const
{
return guidList_.size();
}
int StreamStatsModel::columnCount(const QModelIndex &parent) const
int StreamStatsModel::columnCount(const QModelIndex &/*parent*/) const
{
if (!portList_.size())
return 0;

View File

@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
*/
import "protocol.proto";
import "dot3.proto";
import "llc.proto";
package OstProto;

View File

@ -17,8 +17,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
*/
import "protocol.proto";
package OstProto;
/// Group Management Protocol (i.e. IGMP and MLD)

View File

@ -121,4 +121,5 @@ QMAKE_DISTCLEAN += object_script.*
#QMAKE_EXTRA_TARGETS += binding
include(../protobuf.pri)
include(../options.pri)

View File

@ -144,3 +144,4 @@ SOURCES += \
QMAKE_DISTCLEAN += object_script.*
include(../protobuf.pri)
include(../options.pri)

2
options.pri Normal file
View File

@ -0,0 +1,2 @@
QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]
QMAKE_CXXFLAGS_WARN_ON += -Wall -W -Wextra -Werror

View File

@ -5,3 +5,5 @@ DEFINES += HAVE_REMOTE
LIBS += -lprotobuf
HEADERS += rpcserver.h rpcconn.h pbrpccontroller.h pbrpcchannel.h pbqtio.h
SOURCES += rpcserver.cpp rpcconn.cpp pbrpcchannel.cpp
include (../options.pri)

View File

@ -683,7 +683,7 @@ void Device::sendIp4Reply(PacketBuffer *pktBuf)
uchar *pktData = pktBuf->push(20);
uchar origTtl = pktData[8];
uchar ipProto = pktData[9];
quint32 srcIp, dstIp, tgtIp, mask;
quint32 srcIp, dstIp, tgtIp;
quint32 sum;
// Swap src/dst IP addresses

View File

@ -57,3 +57,4 @@ QMAKE_DISTCLEAN += object_script.*
include (../install.pri)
include (../version.pri)
include (../options.pri)