Removed a bunch of gcc4 warnings - mostly "unused param"

This commit is contained in:
Srivats P. 2010-01-03 08:56:16 +00:00
parent 395024cc0c
commit aac2229403
28 changed files with 98 additions and 83 deletions

View File

@ -3,6 +3,7 @@
//! \todo Enable Scrollbars //! \todo Enable Scrollbars
DumpView::DumpView(QWidget *parent) DumpView::DumpView(QWidget *parent)
: QAbstractItemView(parent)
{ {
int w, h; int w, h;
@ -26,7 +27,7 @@ DumpView::DumpView(QWidget *parent)
qDebug("DumpView::DumpView"); qDebug("DumpView::DumpView");
} }
QModelIndex DumpView::indexAt( const QPoint &point ) const QModelIndex DumpView::indexAt(const QPoint &/*point*/) const
{ {
#if 0 #if 0
int x = point.x(); int x = point.x();
@ -84,12 +85,12 @@ _exit:
return QModelIndex(); return QModelIndex();
} }
void DumpView::scrollTo( const QModelIndex &index, ScrollHint hint ) void DumpView::scrollTo(const QModelIndex &/*index*/, ScrollHint /*hint*/)
{ {
// FIXME: implement scrolling // FIXME: implement scrolling
} }
QRect DumpView::visualRect( const QModelIndex &index ) const QRect DumpView::visualRect(const QModelIndex &/*index*/) const
{ {
// FIXME: calculate actual rect // FIXME: calculate actual rect
return rect(); return rect();
@ -101,20 +102,20 @@ int DumpView::horizontalOffset() const
return horizontalScrollBar()->value(); return horizontalScrollBar()->value();
} }
bool DumpView::isIndexHidden( const QModelIndex &index ) const bool DumpView::isIndexHidden(const QModelIndex &/*index*/) const
{ {
return false; return false;
} }
QModelIndex DumpView::moveCursor( CursorAction cursorAction, QModelIndex DumpView::moveCursor(CursorAction /*cursorAction*/,
Qt::KeyboardModifiers modifiers ) Qt::KeyboardModifiers /*modifiers*/)
{ {
// FIXME(MED): need to implement movement using cursor // FIXME(MED): need to implement movement using cursor
return currentIndex(); return currentIndex();
} }
void DumpView::setSelection( const QRect &rect, void DumpView::setSelection(const QRect &/*rect*/,
QItemSelectionModel::SelectionFlags flags ) QItemSelectionModel::SelectionFlags flags)
{ {
// FIXME(HI): calculate indexes using rect // FIXME(HI): calculate indexes using rect
selectionModel()->select(QModelIndex(), flags); selectionModel()->select(QModelIndex(), flags);
@ -125,22 +126,23 @@ int DumpView::verticalOffset() const
return verticalScrollBar()->value(); return verticalScrollBar()->value();
} }
QRegion DumpView::visualRegionForSelection( const QItemSelection &selection ) const QRegion DumpView::visualRegionForSelection(
const QItemSelection &/*selection*/) const
{ {
// FIXME(HI) // FIXME(HI)
return QRegion(rect()); return QRegion(rect());
} }
//protected slots: //protected slots:
void DumpView::dataChanged( const QModelIndex &topLeft, void DumpView::dataChanged(const QModelIndex &/*topLeft*/,
const QModelIndex &bottomRight ) const QModelIndex &/*bottomRight*/)
{ {
// FIXME(HI) // FIXME(HI)
update(); update();
} }
void DumpView::selectionChanged( const QItemSelection &selected, void DumpView::selectionChanged(const QItemSelection &/*selected*/,
const QItemSelection &deselected ) const QItemSelection &/*deselected*/)
{ {
// FIXME(HI) // FIXME(HI)
update(); update();
@ -220,7 +222,7 @@ void DumpView::populateDump(QByteArray &dump, int &selOfs, int &selSize,
} }
// TODO(LOW): rewrite this function - it's a mess! // TODO(LOW): rewrite this function - it's a mess!
void DumpView::paintEvent(QPaintEvent* event) void DumpView::paintEvent(QPaintEvent* /*event*/)
{ {
QStylePainter painter(viewport()); QStylePainter painter(viewport());
QRect offsetRect = mOffsetPaneTopRect; QRect offsetRect = mOffsetPaneTopRect;

View File

@ -9,7 +9,7 @@ HexLineEdit::HexLineEdit( QWidget * parent)
//QLineEdit::QLineEdit(parent); //QLineEdit::QLineEdit(parent);
} }
void HexLineEdit::focusOutEvent( QFocusEvent *e ) void HexLineEdit::focusOutEvent(QFocusEvent* /*e*/)
{ {
#if 0 #if 0
const QValidator *v = validator(); const QValidator *v = validator();

View File

@ -5,6 +5,7 @@
#include "../common/abstractprotocol.h" #include "../common/abstractprotocol.h"
PacketModel::PacketModel(QObject *parent) PacketModel::PacketModel(QObject *parent)
: QAbstractItemModel(parent)
{ {
} }
@ -51,7 +52,7 @@ int PacketModel::rowCount(const QModelIndex &parent) const
return 0; // catch all return 0; // catch all
} }
int PacketModel::columnCount(const QModelIndex &parent) const int PacketModel::columnCount(const QModelIndex &/*parent*/) const
{ {
return 1; return 1;
} }

View File

@ -16,8 +16,10 @@ public:
int rowCount(const QModelIndex &parent = QModelIndex()) const; int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const; int columnCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role) const; QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation, QVariant headerData(int /*section*/, Qt::Orientation /*orientation*/,
int role = Qt::DisplayRole) const { return QVariant(); } ; int /*role= Qt::DisplayRole*/) const {
return QVariant();
}
QModelIndex index (int row, int col, const QModelIndex & parent = QModelIndex() ) const; QModelIndex index (int row, int col, const QModelIndex & parent = QModelIndex() ) const;
QModelIndex parent(const QModelIndex &index) const; QModelIndex parent(const QModelIndex &index) const;
@ -28,8 +30,8 @@ private:
struct struct
{ {
quint16 type; quint16 type;
#define ITYP_PROTOCOL 1 #define ITYP_PROTOCOL 1
#define ITYP_FIELD 2 #define ITYP_FIELD 2
quint16 protocol; // protocol is valid for both ITYPs quint16 protocol; // protocol is valid for both ITYPs
} ws; } ws;
} IndexId; } IndexId;

View File

@ -85,7 +85,7 @@ void PortGroup::on_rpcChannel_disconnected()
void PortGroup::on_rpcChannel_error(QAbstractSocket::SocketError socketError) void PortGroup::on_rpcChannel_error(QAbstractSocket::SocketError socketError)
{ {
qDebug("error\n"); qDebug("%s: error %d", __FUNCTION__, socketError);
emit portGroupDataChanged(mPortGroupId); emit portGroupDataChanged(mPortGroupId);
} }
@ -429,7 +429,7 @@ _exit:
return; return;
} }
void PortGroup::processModifyStreamAck(OstProto::Ack *ack) void PortGroup::processModifyStreamAck(OstProto::Ack */*ack*/)
{ {
qDebug("In %s", __FUNCTION__); qDebug("In %s", __FUNCTION__);

View File

@ -53,7 +53,7 @@ int PortModel::rowCount(const QModelIndex &parent) const
} }
} }
int PortModel::columnCount(const QModelIndex &parent ) const int PortModel::columnCount(const QModelIndex &/*parent*/) const
{ {
return 1; // FIXME: hardcoding return 1; // FIXME: hardcoding
} }
@ -166,7 +166,7 @@ QVariant PortModel::data(const QModelIndex &index, int role) const
return QVariant(); return QVariant();
} }
QVariant PortModel::headerData(int section, Qt::Orientation orientation, int role) const QVariant PortModel::headerData(int /*section*/, Qt::Orientation orientation, int role) const
{ {
if (role != Qt::DisplayRole) if (role != Qt::DisplayRole)
return QVariant(); return QVariant();

View File

@ -1,6 +1,7 @@
#include "portstatsfilterdialog.h" #include "portstatsfilterdialog.h"
PortStatsFilterDialog::PortStatsFilterDialog(QWidget *parent) PortStatsFilterDialog::PortStatsFilterDialog(QWidget *parent)
: QDialog(parent)
{ {
setupUi(this); setupUi(this);
@ -92,8 +93,8 @@ void PortStatsFilterDialog::on_lvUnselected_doubleClicked(const QModelIndex &ind
{ {
QStandardItem *item; QStandardItem *item;
item = mUnselected.takeItem(lvUnselected->currentIndex().row()); item = mUnselected.takeItem(index.row());
if (mUnselected.removeRow(lvUnselected->currentIndex().row())) if (mUnselected.removeRow(index.row()))
mSelected.appendRow(item); mSelected.appendRow(item);
} }
@ -101,8 +102,8 @@ void PortStatsFilterDialog::on_lvSelected_doubleClicked(const QModelIndex &index
{ {
QStandardItem *item; QStandardItem *item;
item = mSelected.takeItem(lvSelected->currentIndex().row()); item = mSelected.takeItem(index.row());
if (mSelected.removeRow(lvSelected->currentIndex().row())) if (mSelected.removeRow(index.row()))
{ {
mUnselected.appendRow(item); mUnselected.appendRow(item);
mUnselected.sort(0); mUnselected.sort(0);

View File

@ -261,7 +261,7 @@ void PortStatsModel::when_portListChanged()
reset(); reset();
} }
void PortStatsModel::on_portStatsUpdate(int port, void*stats) void PortStatsModel::on_portStatsUpdate(int port, void* /*stats*/)
{ {
QModelIndex topLeft = index(port, 0, QModelIndex()); QModelIndex topLeft = index(port, 0, QModelIndex());
QModelIndex bottomRight = index(port, e_STAT_MAX, QModelIndex()); QModelIndex bottomRight = index(port, e_STAT_MAX, QModelIndex());
@ -277,7 +277,7 @@ void PortStatsModel::updateStats()
pgl->mPortGroups[i]->getPortStats(); pgl->mPortGroups[i]->getPortStats();
} }
void PortStatsModel::when_portGroup_stats_update(quint32 portGroupId) void PortStatsModel::when_portGroup_stats_update(quint32 /*portGroupId*/)
{ {
// FIXME(MED): update only the changed ports, not all // FIXME(MED): update only the changed ports, not all

View File

@ -5,6 +5,7 @@
#include <QItemSelectionModel> #include <QItemSelectionModel>
PortsWindow::PortsWindow(PortGroupList *pgl, QWidget *parent) PortsWindow::PortsWindow(PortGroupList *pgl, QWidget *parent)
: QWidget(parent)
{ {
StreamListDelegate *delegate = new StreamListDelegate; StreamListDelegate *delegate = new StreamListDelegate;
//slm = new StreamListModel(); //slm = new StreamListModel();
@ -90,7 +91,7 @@ void PortsWindow::on_tvStreamList_activated(const QModelIndex & index)
} }
void PortsWindow::when_portView_currentChanged(const QModelIndex& current, void PortsWindow::when_portView_currentChanged(const QModelIndex& current,
const QModelIndex& previous) const QModelIndex& /*previous*/)
{ {
plm->getStreamModel()->setCurrentPortIndex(current); plm->getStreamModel()->setCurrentPortIndex(current);
updatePortViewActions(current); updatePortViewActions(current);
@ -114,8 +115,8 @@ void PortsWindow::when_portView_currentChanged(const QModelIndex& current,
} }
} }
void PortsWindow::when_streamView_currentChanged(const QModelIndex& current, void PortsWindow::when_streamView_currentChanged(const QModelIndex& /*current*/,
const QModelIndex& previous) const QModelIndex& /*previous*/)
{ {
qDebug("stream view current changed"); qDebug("stream view current changed");
updateStreamViewActions(); updateStreamViewActions();

View File

@ -311,7 +311,7 @@ void StreamConfigDialog::on_tbSelectProtocols_currentChanged(int index)
} }
void StreamConfigDialog::when_lvAllProtocols_selectionChanged( void StreamConfigDialog::when_lvAllProtocols_selectionChanged(
const QItemSelection &selected, const QItemSelection &deselected) const QItemSelection &/*selected*/, const QItemSelection &/*deselected*/)
{ {
int size = lvAllProtocols->selectionModel()->selectedIndexes().size(); int size = lvAllProtocols->selectionModel()->selectedIndexes().size();
@ -321,7 +321,7 @@ void StreamConfigDialog::when_lvAllProtocols_selectionChanged(
} }
void StreamConfigDialog::when_lvSelectedProtocols_currentChanged( void StreamConfigDialog::when_lvSelectedProtocols_currentChanged(
const QModelIndex &current, const QModelIndex &previous) const QModelIndex &current, const QModelIndex &/*previous*/)
{ {
qDebug("%s: currentRow = %d\n", __FUNCTION__, current.row()); qDebug("%s: currentRow = %d\n", __FUNCTION__, current.row());

View File

@ -21,7 +21,7 @@ int StreamModel::rowCount(const QModelIndex &parent) const
return 0; return 0;
} }
int StreamModel::columnCount(const QModelIndex &parent ) const int StreamModel::columnCount(const QModelIndex &/*parent*/) const
{ {
return (int) StreamMaxFields; return (int) StreamMaxFields;
} }
@ -197,7 +197,7 @@ QVariant StreamModel::headerData(int section, Qt::Orientation orientation, int r
return QVariant(); return QVariant();
} }
bool StreamModel::insertRows(int row, int count, const QModelIndex &parent) bool StreamModel::insertRows(int row, int count, const QModelIndex &/*parent*/)
{ {
qDebug("insertRows() row = %d", row); qDebug("insertRows() row = %d", row);
qDebug("insertRows() count = %d", count); qDebug("insertRows() count = %d", count);
@ -209,7 +209,7 @@ bool StreamModel::insertRows(int row, int count, const QModelIndex &parent)
return true; return true;
} }
bool StreamModel::removeRows(int row, int count, const QModelIndex &parent) bool StreamModel::removeRows(int row, int count, const QModelIndex &/*parent*/)
{ {
qDebug("removeRows() row = %d", row); qDebug("removeRows() row = %d", row);
qDebug("removeRows() count = %d", count); qDebug("removeRows() count = %d", count);

View File

@ -36,8 +36,8 @@ AbstractProtocol::~AbstractProtocol()
{ {
} }
AbstractProtocol* AbstractProtocol::createInstance(StreamBase *stream, AbstractProtocol* AbstractProtocol::createInstance(StreamBase* /* stream */,
AbstractProtocol *parent) AbstractProtocol* /* parent */)
{ {
return NULL; return NULL;
} }
@ -124,7 +124,7 @@ int AbstractProtocol::frameFieldCount() const
return (fieldCount() - metaFieldCount()); return (fieldCount() - metaFieldCount());
} }
AbstractProtocol::FieldFlags AbstractProtocol::fieldFlags(int index) const AbstractProtocol::FieldFlags AbstractProtocol::fieldFlags(int /*index*/) const
{ {
return FieldIsNormal; return FieldIsNormal;
} }
@ -187,8 +187,8 @@ QVariant AbstractProtocol::fieldData(int index, FieldAttrib attrib,
/*! Sets the value of a field corresponding to index \n /*! Sets the value of a field corresponding to index \n
Returns true if field is successfully set, false otherwise \n Returns true if field is successfully set, false otherwise \n
The default implementation always returns false */ The default implementation always returns false */
bool AbstractProtocol::setFieldData(int index, const QVariant &value, bool AbstractProtocol::setFieldData(int /*index*/, const QVariant& /*value*/,
FieldAttrib attrib) FieldAttrib /*attrib*/)
{ {
return false; return false;
} }
@ -198,7 +198,7 @@ AbstractProtocol::ProtocolIdType AbstractProtocol::protocolIdType() const
return ProtocolIdNone; return ProtocolIdNone;
} }
quint32 AbstractProtocol::protocolId(ProtocolIdType type) const quint32 AbstractProtocol::protocolId(ProtocolIdType /*type*/) const
{ {
return 0; return 0;
} }

View File

@ -113,8 +113,8 @@ QVariant Dot3Protocol::fieldData(int index, FieldAttrib attrib,
return AbstractProtocol::fieldData(index, attrib, streamIndex); return AbstractProtocol::fieldData(index, attrib, streamIndex);
} }
bool Dot3Protocol::setFieldData(int index, const QVariant &value, bool Dot3Protocol::setFieldData(int /*index*/, const QVariant &/*value*/,
FieldAttrib attrib) FieldAttrib /*attrib*/)
{ {
return false; return false;
} }

View File

@ -130,8 +130,8 @@ QVariant LlcProtocol::fieldData(int index, FieldAttrib attrib,
return AbstractProtocol::fieldData(index, attrib, streamIndex); return AbstractProtocol::fieldData(index, attrib, streamIndex);
} }
bool LlcProtocol::setFieldData(int index, const QVariant &value, bool LlcProtocol::setFieldData(int /*index*/, const QVariant &/*value*/,
FieldAttrib attrib) FieldAttrib /*attrib*/)
{ {
return false; return false;
} }

View File

@ -233,8 +233,8 @@ QVariant MacProtocol::fieldData(int index, FieldAttrib attrib,
return AbstractProtocol::fieldData(index, attrib, streamIndex); return AbstractProtocol::fieldData(index, attrib, streamIndex);
} }
bool MacProtocol::setFieldData(int index, const QVariant &value, bool MacProtocol::setFieldData(int /*index*/, const QVariant& /*value*/,
FieldAttrib attrib) FieldAttrib /*attrib*/)
{ {
return false; return false;
} }

View File

@ -181,8 +181,8 @@ QVariant PayloadProtocol::fieldData(int index, FieldAttrib attrib,
return AbstractProtocol::fieldData(index, attrib, streamIndex); return AbstractProtocol::fieldData(index, attrib, streamIndex);
} }
bool PayloadProtocol::setFieldData(int index, const QVariant &value, bool PayloadProtocol::setFieldData(int /*index*/, const QVariant &/*value*/,
FieldAttrib attrib) FieldAttrib /*attrib*/)
{ {
return false; return false;
} }

View File

@ -220,6 +220,7 @@ QVariant SampleProtocol::fieldData(int index, FieldAttrib attrib,
cksum = protocolFrameCksum(streamIndex, CksumIp); cksum = protocolFrameCksum(streamIndex, CksumIp);
} }
default: default:
cksum = 0; // avoid the 'maybe used unitialized' warning
break; break;
} }

View File

@ -135,8 +135,8 @@ QVariant SnapProtocol::fieldData(int index, FieldAttrib attrib,
return AbstractProtocol::fieldData(index, attrib, streamIndex); return AbstractProtocol::fieldData(index, attrib, streamIndex);
} }
bool SnapProtocol::setFieldData(int index, const QVariant &value, bool SnapProtocol::setFieldData(int /*index*/, const QVariant &/*value*/,
FieldAttrib attrib) FieldAttrib /*attrib*/)
{ {
return false; return false;
} }

View File

@ -191,6 +191,7 @@ quint16 StreamBase::frameLen(int streamIndex) const
break; break;
case OstProto::StreamCore::e_fl_random: case OstProto::StreamCore::e_fl_random:
//! \todo (MED) This 'random' sequence is same across iterations //! \todo (MED) This 'random' sequence is same across iterations
pktLen = 64; // to avoid the 'maybe used uninitialized' warning
qsrand(((uint) this)); qsrand(((uint) this));
for (int i = 0; i <= streamIndex; i++) for (int i = 0; i <= streamIndex; i++)
pktLen = qrand(); pktLen = qrand();

View File

@ -374,8 +374,8 @@ QVariant TcpProtocol::fieldData(int index, FieldAttrib attrib,
return AbstractProtocol::fieldData(index, attrib, streamIndex); return AbstractProtocol::fieldData(index, attrib, streamIndex);
} }
bool TcpProtocol::setFieldData(int index, const QVariant &value, bool TcpProtocol::setFieldData(int /*index*/, const QVariant &/*value*/,
FieldAttrib attrib) FieldAttrib /*attrib*/)
{ {
return false; return false;
} }

View File

@ -205,6 +205,7 @@ QVariant UdpProtocol::fieldData(int index, FieldAttrib attrib,
qDebug("UDP cksum = %hu", cksum); qDebug("UDP cksum = %hu", cksum);
} }
default: default:
cksum = 0;
break; break;
} }
@ -251,8 +252,8 @@ QVariant UdpProtocol::fieldData(int index, FieldAttrib attrib,
return AbstractProtocol::fieldData(index, attrib, streamIndex); return AbstractProtocol::fieldData(index, attrib, streamIndex);
} }
bool UdpProtocol::setFieldData(int index, const QVariant &value, bool UdpProtocol::setFieldData(int /*index*/, const QVariant &/*value*/,
FieldAttrib attrib) FieldAttrib /*attrib*/)
{ {
//! implement UdpProtocol::setFieldData() //! implement UdpProtocol::setFieldData()
return false; return false;

View File

@ -35,7 +35,7 @@ void UserScriptConfigForm::on_programEdit_textChanged()
compileButton->setEnabled(true); compileButton->setEnabled(true);
} }
void UserScriptConfigForm::on_compileButton_clicked(bool checked) void UserScriptConfigForm::on_compileButton_clicked(bool /*checked*/)
{ {
protocol_->storeConfigWidget(); protocol_->storeConfigWidget();
if (!protocol_->isScriptValid()) if (!protocol_->isScriptValid())

View File

@ -193,8 +193,8 @@ QVariant VlanProtocol::fieldData(int index, FieldAttrib attrib,
return AbstractProtocol::fieldData(index, attrib, streamIndex); return AbstractProtocol::fieldData(index, attrib, streamIndex);
} }
bool VlanProtocol::setFieldData(int index, const QVariant &value, bool VlanProtocol::setFieldData(int /*index*/, const QVariant &/*value*/,
FieldAttrib attrib) FieldAttrib /*attrib*/)
{ {
return false; return false;
} }

View File

@ -24,7 +24,9 @@ public:
void SetFailed(const std::string &reason) void SetFailed(const std::string &reason)
{ failed = true; errStr = reason; } { failed = true; errStr = reason; }
bool IsCanceled() const { return false; }; bool IsCanceled() const { return false; };
void NotifyOnCancel(::google::protobuf::Closure *callback) { /*! \todo (MED) */ } void NotifyOnCancel(::google::protobuf::Closure* /* callback */) {
/*! \todo (MED) */
}
// srivatsp added // srivatsp added
QIODevice* binaryBlob() { return blob; }; QIODevice* binaryBlob() { return blob; };

View File

@ -160,7 +160,8 @@ void RpcServer::when_disconnected()
void RpcServer::when_error(QAbstractSocket::SocketError socketError) void RpcServer::when_error(QAbstractSocket::SocketError socketError)
{ {
qDebug("%s", clientSock->errorString().toAscii().constData()); qDebug("%s (%d)", clientSock->errorString().toAscii().constData(),
socketError);
} }
void RpcServer::when_dataAvail() void RpcServer::when_dataAvail()

View File

@ -8,7 +8,7 @@
AbstractPort::AbstractPort(int id, const char *device) AbstractPort::AbstractPort(int id, const char *device)
{ {
data_.mutable_port_id()->set_id(id); data_.mutable_port_id()->set_id(id);
data_.set_name(QString("if%1 ").arg(id).toStdString()); data_.set_name(device);
//! \todo (LOW) admin enable/disable of port //! \todo (LOW) admin enable/disable of port
data_.set_is_enabled(true); data_.set_is_enabled(true);

View File

@ -27,8 +27,8 @@ MyService::~MyService()
{ {
} }
void MyService::getPortIdList(::google::protobuf::RpcController* controller, void MyService::getPortIdList(::google::protobuf::RpcController* /*controller*/,
const ::OstProto::Void* request, const ::OstProto::Void* /*request*/,
::OstProto::PortIdList* response, ::OstProto::PortIdList* response,
::google::protobuf::Closure* done) ::google::protobuf::Closure* done)
{ {
@ -45,7 +45,7 @@ void MyService::getPortIdList(::google::protobuf::RpcController* controller,
done->Run(); done->Run();
} }
void MyService::getPortConfig(::google::protobuf::RpcController* controller, void MyService::getPortConfig(::google::protobuf::RpcController* /*controller*/,
const ::OstProto::PortIdList* request, const ::OstProto::PortIdList* request,
::OstProto::PortConfigList* response, ::OstProto::PortConfigList* response,
::google::protobuf::Closure* done) ::google::protobuf::Closure* done)
@ -134,7 +134,7 @@ _invalid_port:
void MyService::addStream(::google::protobuf::RpcController* controller, void MyService::addStream(::google::protobuf::RpcController* controller,
const ::OstProto::StreamIdList* request, const ::OstProto::StreamIdList* request,
::OstProto::Ack* response, ::OstProto::Ack* /*response*/,
::google::protobuf::Closure* done) ::google::protobuf::Closure* done)
{ {
int portId; int portId;
@ -175,7 +175,7 @@ _invalid_port:
void MyService::deleteStream(::google::protobuf::RpcController* controller, void MyService::deleteStream(::google::protobuf::RpcController* controller,
const ::OstProto::StreamIdList* request, const ::OstProto::StreamIdList* request,
::OstProto::Ack* response, ::OstProto::Ack* /*response*/,
::google::protobuf::Closure* done) ::google::protobuf::Closure* done)
{ {
int portId; int portId;
@ -201,7 +201,7 @@ _invalid_port:
void MyService::modifyStream(::google::protobuf::RpcController* controller, void MyService::modifyStream(::google::protobuf::RpcController* controller,
const ::OstProto::StreamConfigList* request, const ::OstProto::StreamConfigList* request,
::OstProto::Ack* response, ::OstProto::Ack* /*response*/,
::google::protobuf::Closure* done) ::google::protobuf::Closure* done)
{ {
int portId; int portId;
@ -234,9 +234,9 @@ _invalid_port:
done->Run(); done->Run();
} }
void MyService::startTx(::google::protobuf::RpcController* controller, void MyService::startTx(::google::protobuf::RpcController* /*controller*/,
const ::OstProto::PortIdList* request, const ::OstProto::PortIdList* request,
::OstProto::Ack* response, ::OstProto::Ack* /*response*/,
::google::protobuf::Closure* done) ::google::protobuf::Closure* done)
{ {
qDebug("In %s", __PRETTY_FUNCTION__); qDebug("In %s", __PRETTY_FUNCTION__);
@ -257,9 +257,9 @@ void MyService::startTx(::google::protobuf::RpcController* controller,
done->Run(); done->Run();
} }
void MyService::stopTx(::google::protobuf::RpcController* controller, void MyService::stopTx(::google::protobuf::RpcController* /*controller*/,
const ::OstProto::PortIdList* request, const ::OstProto::PortIdList* request,
::OstProto::Ack* response, ::OstProto::Ack* /*response*/,
::google::protobuf::Closure* done) ::google::protobuf::Closure* done)
{ {
qDebug("In %s", __PRETTY_FUNCTION__); qDebug("In %s", __PRETTY_FUNCTION__);
@ -280,9 +280,9 @@ void MyService::stopTx(::google::protobuf::RpcController* controller,
done->Run(); done->Run();
} }
void MyService::startCapture(::google::protobuf::RpcController* controller, void MyService::startCapture(::google::protobuf::RpcController* /*controller*/,
const ::OstProto::PortIdList* request, const ::OstProto::PortIdList* request,
::OstProto::Ack* response, ::OstProto::Ack* /*response*/,
::google::protobuf::Closure* done) ::google::protobuf::Closure* done)
{ {
qDebug("In %s", __PRETTY_FUNCTION__); qDebug("In %s", __PRETTY_FUNCTION__);
@ -303,9 +303,9 @@ void MyService::startCapture(::google::protobuf::RpcController* controller,
done->Run(); done->Run();
} }
void MyService::stopCapture(::google::protobuf::RpcController* controller, void MyService::stopCapture(::google::protobuf::RpcController* /*controller*/,
const ::OstProto::PortIdList* request, const ::OstProto::PortIdList* request,
::OstProto::Ack* response, ::OstProto::Ack* /*response*/,
::google::protobuf::Closure* done) ::google::protobuf::Closure* done)
{ {
qDebug("In %s", __PRETTY_FUNCTION__); qDebug("In %s", __PRETTY_FUNCTION__);
@ -327,7 +327,7 @@ void MyService::stopCapture(::google::protobuf::RpcController* controller,
void MyService::getCaptureBuffer(::google::protobuf::RpcController* controller, void MyService::getCaptureBuffer(::google::protobuf::RpcController* controller,
const ::OstProto::PortId* request, const ::OstProto::PortId* request,
::OstProto::CaptureBuffer* response, ::OstProto::CaptureBuffer* /*response*/,
::google::protobuf::Closure* done) ::google::protobuf::Closure* done)
{ {
int portId; int portId;
@ -350,7 +350,7 @@ _invalid_port:
done->Run(); done->Run();
} }
void MyService::getStats(::google::protobuf::RpcController* controller, void MyService::getStats(::google::protobuf::RpcController* /*controller*/,
const ::OstProto::PortIdList* request, const ::OstProto::PortIdList* request,
::OstProto::PortStatsList* response, ::OstProto::PortStatsList* response,
::google::protobuf::Closure* done) ::google::protobuf::Closure* done)
@ -397,9 +397,9 @@ void MyService::getStats(::google::protobuf::RpcController* controller,
done->Run(); done->Run();
} }
void MyService::clearStats(::google::protobuf::RpcController* controller, void MyService::clearStats(::google::protobuf::RpcController* /*controller*/,
const ::OstProto::PortIdList* request, const ::OstProto::PortIdList* request,
::OstProto::Ack* response, ::OstProto::Ack* /*response*/,
::google::protobuf::Closure* done) ::google::protobuf::Closure* done)
{ {
qDebug("In %s", __PRETTY_FUNCTION__); qDebug("In %s", __PRETTY_FUNCTION__);

View File

@ -24,7 +24,9 @@ PcapPort::PcapPort(int id, const char *device)
{ {
if (strcmp(device, dev->name) == 0) if (strcmp(device, dev->name) == 0)
{ {
#ifndef Q_OS_WIN32 #ifdef Q_OS_WIN32
data_.set_name(QString("if%1 ").arg(id).toStdString());
#else
if (dev->name) if (dev->name)
data_.set_name(dev->name); data_.set_name(dev->name);
#endif #endif