Finish removal of Q_UNUSED.

Todo: qcustomplot via upstream

Change-Id: I19cf98f1281ecb1f6efbb7d36c997d5aa43f5baf
Reviewed-on: https://code.wireshark.org/review/9547
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
This commit is contained in:
Joerg Mayer 2015-07-08 00:13:24 +02:00 committed by Jörg Mayer
parent 51a37b666a
commit 0619ed241c
20 changed files with 38 additions and 96 deletions

View File

@ -368,9 +368,8 @@ void BluetoothAttServerAttributesDialog::on_actionSave_as_image_triggered()
image.save(fileName, "PNG"); image.save(fileName, "PNG");
} }
void BluetoothAttServerAttributesDialog::on_buttonBox_clicked(QAbstractButton *button) void BluetoothAttServerAttributesDialog::on_buttonBox_clicked(QAbstractButton *)
{ {
Q_UNUSED(button);
/* if (button == foo_button_) */ /* if (button == foo_button_) */
} }

View File

@ -393,9 +393,8 @@ void BluetoothDevicesDialog::on_actionSave_as_image_triggered()
image.save(fileName, "PNG"); image.save(fileName, "PNG");
} }
void BluetoothDevicesDialog::on_buttonBox_clicked(QAbstractButton *button) void BluetoothDevicesDialog::on_buttonBox_clicked(QAbstractButton *)
{ {
Q_UNUSED(button);
/* if (button == foo_button_) */ /* if (button == foo_button_) */
} }

View File

@ -99,10 +99,8 @@ void ByteViewText::setProtocolHighlight(int start, int end)
viewport()->update(); viewport()->update();
} }
void ByteViewText::setFieldHighlight(int start, int end, guint32 mask, int mask_le) void ByteViewText::setFieldHighlight(int start, int end, guint32, int)
{ {
Q_UNUSED(mask);
Q_UNUSED(mask_le);
f_bound_ = QPair<guint, guint>(qMax(0, start), qMax(0, end)); f_bound_ = QPair<guint, guint>(qMax(0, start), qMax(0, end));
f_bound_save_ = f_bound_; f_bound_save_ = f_bound_;
scrollToByte(start); scrollToByte(start);

View File

@ -67,17 +67,13 @@ extern void capture_start_confirmed(void) {
/** Open a new file coming from drag and drop. /** Open a new file coming from drag and drop.
* @param cf_names_freeme the selection data reported from GTK * @param cf_names_freeme the selection data reported from GTK
*/ */
extern void dnd_open_file_cmd(gchar *cf_names_freeme) { extern void dnd_open_file_cmd(gchar *) {
Q_UNUSED(cf_names_freeme);
}
// From gtk/menus.h & main_menubar.c // From gtk/menus.h & main_menubar.c
/** User pushed a recent file submenu item. /** User pushed a recent file submenu item.
* *
* @param widget parent widget * @param widget parent widget
*/ */
extern void menu_open_recent_file_cmd(gpointer action){ extern void menu_open_recent_file_cmd(gpointer){
Q_UNUSED(action)
} }
/** One of the name resolution menu items changed. */ /** One of the name resolution menu items changed. */

View File

@ -38,11 +38,8 @@
// - Start adding the progress bar to dialogs. // - Start adding the progress bar to dialogs.
// - Don't complain so loudly when the user stops a capture. // - Don't complain so loudly when the user stops a capture.
progdlg_t *create_progress_dlg(const gpointer top_level_window, const gchar *task_title, const gchar *item_title, progdlg_t *create_progress_dlg(const gpointer top_level_window, const gchar *, const gchar *,
gboolean terminate_is_stop, gboolean *stop_flag) { gboolean terminate_is_stop, gboolean *stop_flag) {
Q_UNUSED(task_title);
Q_UNUSED(item_title);
CaptureFileProgressFrame *cfpf; CaptureFileProgressFrame *cfpf;
QWidget *main_window; QWidget *main_window;
@ -67,9 +64,8 @@ progdlg_t *create_progress_dlg(const gpointer top_level_window, const gchar *tas
progdlg_t * progdlg_t *
delayed_create_progress_dlg(const gpointer top_level_window, const gchar *task_title, const gchar *item_title, delayed_create_progress_dlg(const gpointer top_level_window, const gchar *task_title, const gchar *item_title,
gboolean terminate_is_stop, gboolean *stop_flag, gboolean terminate_is_stop, gboolean *stop_flag,
const GTimeVal *start_time, gfloat progress) const GTimeVal *, gfloat progress)
{ {
Q_UNUSED(start_time);
progdlg_t *progress_dialog = create_progress_dlg(top_level_window, task_title, item_title, terminate_is_stop, stop_flag); progdlg_t *progress_dialog = create_progress_dlg(top_level_window, task_title, item_title, terminate_is_stop, stop_flag);
update_progress_dlg(progress_dialog, progress, item_title); update_progress_dlg(progress_dialog, progress, item_title);
return progress_dialog; return progress_dialog;
@ -79,9 +75,8 @@ delayed_create_progress_dlg(const gpointer top_level_window, const gchar *task_t
* Update the progress information of the progress bar box. * Update the progress information of the progress bar box.
*/ */
void void
update_progress_dlg(progdlg_t *dlg, gfloat percentage, const gchar *status) update_progress_dlg(progdlg_t *dlg, gfloat percentage, const gchar *)
{ {
Q_UNUSED(status);
if (!dlg) return; if (!dlg) return;
dlg->progress_frame->setValue(percentage * 100); dlg->progress_frame->setValue(percentage * 100);

View File

@ -31,11 +31,9 @@
/* create the capture info dialog */ /* create the capture info dialog */
/* will keep pointers to the fields in the counts parameter */ /* will keep pointers to the fields in the counts parameter */
void capture_info_ui_create( void capture_info_ui_create(
capture_info *cinfo, capture_info *,
capture_session *cap_session) capture_session *)
{ {
Q_UNUSED(cinfo);
Q_UNUSED(cap_session);
g_log(NULL, G_LOG_LEVEL_DEBUG, "FIX: capture_info_ui_create"); g_log(NULL, G_LOG_LEVEL_DEBUG, "FIX: capture_info_ui_create");
} }
@ -43,17 +41,15 @@ capture_session *cap_session)
/* As this function is a bit time critical while capturing, */ /* As this function is a bit time critical while capturing, */
/* prepare everything possible in the capture_info_ui_create() function above! */ /* prepare everything possible in the capture_info_ui_create() function above! */
void capture_info_ui_update( void capture_info_ui_update(
capture_info *cinfo) capture_info *)
{ {
Q_UNUSED(cinfo);
g_log(NULL, G_LOG_LEVEL_DEBUG, "FIX: capture_info_ui_update"); g_log(NULL, G_LOG_LEVEL_DEBUG, "FIX: capture_info_ui_update");
} }
/* destroy the capture info dialog again */ /* destroy the capture info dialog again */
void capture_info_ui_destroy( void capture_info_ui_destroy(
capture_info *cinfo) capture_info *)
{ {
Q_UNUSED(cinfo);
g_log(NULL, G_LOG_LEVEL_DEBUG, "FIX: capture_info_ui_destroy"); g_log(NULL, G_LOG_LEVEL_DEBUG, "FIX: capture_info_ui_destroy");
} }

View File

@ -202,10 +202,8 @@ void CaptureInterfacesDialog::updateWidgets()
start_bt_->setEnabled(can_capture); start_bt_->setEnabled(can_capture);
} }
void CaptureInterfacesDialog::interfaceClicked(QTreeWidgetItem *item, int column) void CaptureInterfacesDialog::interfaceClicked(QTreeWidgetItem *, int)
{ {
Q_UNUSED(item)
Q_UNUSED(column)
guint i; guint i;
QString filter = ui->allFilterComboBox->currentText(); QString filter = ui->allFilterComboBox->currentText();
@ -916,9 +914,8 @@ InterfaceTreeDelegate::~InterfaceTreeDelegate()
} }
QWidget* InterfaceTreeDelegate::createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const QWidget* InterfaceTreeDelegate::createEditor( QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &index ) const
{ {
Q_UNUSED(option);
QWidget *w = NULL; QWidget *w = NULL;
#ifdef SHOW_BUFFER_COLUMN #ifdef SHOW_BUFFER_COLUMN
gint buffer = DEFAULT_CAPTURE_BUFFER_SIZE; gint buffer = DEFAULT_CAPTURE_BUFFER_SIZE;

View File

@ -65,9 +65,8 @@ CapturePreferencesFrame::~CapturePreferencesFrame()
delete ui; delete ui;
} }
void CapturePreferencesFrame::showEvent(QShowEvent *evt) void CapturePreferencesFrame::showEvent(QShowEvent *)
{ {
Q_UNUSED(evt);
updateWidgets(); updateWidgets();
} }

View File

@ -374,9 +374,8 @@ void ColoringRulesDialog::on_buttonBox_helpRequested()
// Delegate for editing coloring rule names and filters. // Delegate for editing coloring rule names and filters.
// //
QWidget *ColoringRulesTreeDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const QWidget *ColoringRulesTreeDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &index) const
{ {
Q_UNUSED(option);
QWidget *w = NULL; QWidget *w = NULL;
QTreeWidgetItem *ti = tree_->topLevelItem(index.row()); QTreeWidgetItem *ti = tree_->topLevelItem(index.row());

View File

@ -109,10 +109,8 @@ void CompiledFilterOutput::compileFilter()
} }
} }
void CompiledFilterOutput::on_interfaceList_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous) void CompiledFilterOutput::on_interfaceList_currentItemChanged(QListWidgetItem *current, QListWidgetItem *)
{ {
Q_UNUSED(previous);
QString interface = current->text(); QString interface = current->text();
QHash<QString, QString>::const_iterator iter = compile_results.find(interface); QHash<QString, QString>::const_iterator iter = compile_results.find(interface);
ui->filterList->clear(); ui->filterList->clear();

View File

@ -279,9 +279,8 @@ void ConversationDialog::itemSelectionChanged()
graph_bt_->setEnabled(graph_enable); graph_bt_->setEnabled(graph_enable);
} }
void ConversationDialog::on_nameResolutionCheckBox_toggled(bool checked) void ConversationDialog::on_nameResolutionCheckBox_toggled(bool)
{ {
Q_UNUSED(checked);
updateWidgets(); updateWidgets();
} }
@ -314,7 +313,6 @@ void ConversationDialog::on_buttonBox_helpRequested()
void init_conversation_table(struct register_ct* ct, const char *filter) void init_conversation_table(struct register_ct* ct, const char *filter)
{ {
Q_UNUSED(ct)
wsApp->emitStatCommandSignal("Conversations", filter, GINT_TO_POINTER(get_conversation_proto_id(ct))); wsApp->emitStatCommandSignal("Conversations", filter, GINT_TO_POINTER(get_conversation_proto_id(ct)));
} }

View File

@ -195,9 +195,8 @@ void DecodeAsDialog::on_decodeAsTreeWidget_currentItemChanged(QTreeWidgetItem *c
} }
} }
void DecodeAsDialog::on_decodeAsTreeWidget_itemActivated(QTreeWidgetItem *item, int column) void DecodeAsDialog::on_decodeAsTreeWidget_itemActivated(QTreeWidgetItem *item, int)
{ {
Q_UNUSED(column);
GList *cur; GList *cur;
table_names_combo_box_ = new QComboBox(); table_names_combo_box_ = new QComboBox();
@ -286,10 +285,8 @@ void DecodeAsDialog::on_decodeAsTreeWidget_itemSelectionChanged()
} }
} }
void DecodeAsDialog::buildChangedList(const gchar *table_name, ftenum_t selector_type, gpointer key, gpointer value, gpointer user_data) void DecodeAsDialog::buildChangedList(const gchar *table_name, ftenum_t, gpointer key, gpointer value, gpointer user_data)
{ {
Q_UNUSED(selector_type);
DecodeAsDialog *da_dlg = (DecodeAsDialog *)user_data; DecodeAsDialog *da_dlg = (DecodeAsDialog *)user_data;
if (!da_dlg) return; if (!da_dlg) return;
@ -321,10 +318,8 @@ void DecodeAsDialog::buildChangedList(const gchar *table_name, ftenum_t selector
da_dlg->ui->decodeAsTreeWidget->addTopLevelItem(item); da_dlg->ui->decodeAsTreeWidget->addTopLevelItem(item);
} }
void DecodeAsDialog::buildDceRpcChangedList(gpointer data, gpointer user_data) void DecodeAsDialog::buildDceRpcChangedList(gpointer, gpointer)
{ {
Q_UNUSED(data);
Q_UNUSED(user_data);
// decode_dcerpc_bind_values_t *binding = (decode_dcerpc_bind_values_t *)data; // decode_dcerpc_bind_values_t *binding = (decode_dcerpc_bind_values_t *)data;
} }
@ -401,11 +396,8 @@ void DecodeAsDialog::tableNamesDestroyed()
table_names_combo_box_ = NULL; table_names_combo_box_ = NULL;
} }
void DecodeAsDialog::decodeAddProtocol(const gchar *table_name, const gchar *proto_name, gpointer value, gpointer user_data) void DecodeAsDialog::decodeAddProtocol(const gchar *, const gchar *proto_name, gpointer value, gpointer user_data)
{ {
Q_UNUSED(table_name);
Q_UNUSED(value);
QSet<dissector_info_t *> *dissector_info_set = (QSet<dissector_info_t *> *)user_data; QSet<dissector_info_t *> *dissector_info_set = (QSet<dissector_info_t *> *)user_data;
if (!dissector_info_set) return; if (!dissector_info_set) return;

View File

@ -207,7 +207,6 @@ void EndpointDialog::on_buttonBox_helpRequested()
void init_endpoint_table(struct register_ct* ct, const char *filter) void init_endpoint_table(struct register_ct* ct, const char *filter)
{ {
Q_UNUSED(ct)
wsApp->emitStatCommandSignal("Endpoints", filter, GINT_TO_POINTER(get_conversation_proto_id(ct))); wsApp->emitStatCommandSignal("Endpoints", filter, GINT_TO_POINTER(get_conversation_proto_id(ct)));
} }

View File

@ -214,10 +214,8 @@ void ExportObjectDialog::on_buttonBox_helpRequested()
wsApp->helpTopicAction(HELP_EXPORT_OBJECT_LIST); wsApp->helpTopicAction(HELP_EXPORT_OBJECT_LIST);
} }
void ExportObjectDialog::on_objectTree_currentItemChanged(QTreeWidgetItem *item, QTreeWidgetItem *previous) void ExportObjectDialog::on_objectTree_currentItemChanged(QTreeWidgetItem *item, QTreeWidgetItem *)
{ {
Q_UNUSED(previous);
if (!item) { if (!item) {
if (save_bt_) save_bt_->setEnabled(false); if (save_bt_) save_bt_->setEnabled(false);
return; return;

View File

@ -567,9 +567,8 @@ QWidget * ExtcapArgument::createLabel(QWidget * parent)
return label; return label;
} }
QWidget * ExtcapArgument::createEditor(QWidget * parent) QWidget * ExtcapArgument::createEditor(QWidget *)
{ {
Q_UNUSED(parent);
return 0; return 0;
} }

View File

@ -167,10 +167,8 @@ void FileSetDialog::on_buttonBox_helpRequested()
wsApp->helpTopicAction(HELP_FILESET_DIALOG); wsApp->helpTopicAction(HELP_FILESET_DIALOG);
} }
void FileSetDialog::on_fileSetTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous) void FileSetDialog::on_fileSetTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *)
{ {
Q_UNUSED(previous);
fileset_entry *entry; fileset_entry *entry;
if (!current) if (!current)

View File

@ -368,10 +368,8 @@ FollowStreamDialog::readStream()
//Copy from ui/gtk/follow_udp.c //Copy from ui/gtk/follow_udp.c
static int static int
udp_queue_packet_data(void *tapdata, packet_info *pinfo, udp_queue_packet_data(void *tapdata, packet_info *pinfo,
epan_dissect_t *edt, const void *data) epan_dissect_t *, const void *data)
{ {
Q_UNUSED(edt);
follow_record_t *follow_record; follow_record_t *follow_record;
follow_info_t *follow_info = (follow_info_t *)tapdata; follow_info_t *follow_info = (follow_info_t *)tapdata;
tvbuff_t *next_tvb = (tvbuff_t *)data; tvbuff_t *next_tvb = (tvbuff_t *)data;
@ -403,10 +401,8 @@ udp_queue_packet_data(void *tapdata, packet_info *pinfo,
//Copy from ui/gtk/follow_ssl.c //Copy from ui/gtk/follow_ssl.c
static int static int
ssl_queue_packet_data(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *ssl) ssl_queue_packet_data(void *tapdata, packet_info *pinfo, epan_dissect_t *, const void *ssl)
{ {
Q_UNUSED(edt);
follow_info_t * follow_info = (follow_info_t*) tapdata; follow_info_t * follow_info = (follow_info_t*) tapdata;
SslDecryptedRecord * rec = NULL; SslDecryptedRecord * rec = NULL;
SslDataInfo * appl_data = NULL; SslDataInfo * appl_data = NULL;
@ -597,9 +593,8 @@ void FollowStreamDialog::addText(QString text, gboolean is_from_server, guint32
// / (slash), Ctrl-F - Focus and highlight the search box // / (slash), Ctrl-F - Focus and highlight the search box
// Ctrl-G, Ctrl-N, F3 - Find next // Ctrl-G, Ctrl-N, F3 - Find next
// Should we make it so that typing any text starts searching? // Should we make it so that typing any text starts searching?
bool FollowStreamDialog::eventFilter(QObject *obj, QEvent *event) bool FollowStreamDialog::eventFilter(QObject *, QEvent *event)
{ {
Q_UNUSED(obj);
if (ui->teStreamContent->hasFocus() && event->type() == QEvent::KeyPress) { if (ui->teStreamContent->hasFocus() && event->type() == QEvent::KeyPress) {
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event); QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
if (keyEvent->matches(QKeySequence::SelectAll) || keyEvent->matches(QKeySequence::Copy) if (keyEvent->matches(QKeySequence::SelectAll) || keyEvent->matches(QKeySequence::Copy)

View File

@ -65,10 +65,8 @@ FontColorPreferencesFrame::~FontColorPreferencesFrame()
delete ui; delete ui;
} }
void FontColorPreferencesFrame::showEvent(QShowEvent *evt) void FontColorPreferencesFrame::showEvent(QShowEvent *)
{ {
Q_UNUSED(evt)
GRand *rand_state = g_rand_new(); GRand *rand_state = g_rand_new();
QString pangram = QString(font_pangrams_[g_rand_int_range(rand_state, 0, num_font_pangrams_)]) + " 0123456789"; QString pangram = QString(font_pangrams_[g_rand_int_range(rand_state, 0, num_font_pangrams_)]) + " 0123456789";
ui->fontSampleLineEdit->setText(pangram); ui->fontSampleLineEdit->setText(pangram);

View File

@ -107,9 +107,7 @@ void InterfaceTree::resetColumnCount()
setColumnCount(IFTREE_COL_MAX); setColumnCount(IFTREE_COL_MAX);
} }
void InterfaceTree::hideEvent(QHideEvent *evt) { void InterfaceTree::hideEvent(QHideEvent *) {
Q_UNUSED(evt);
#ifdef HAVE_LIBPCAP #ifdef HAVE_LIBPCAP
if (stat_timer_) stat_timer_->stop(); if (stat_timer_) stat_timer_->stop();
if (stat_cache_) { if (stat_cache_) {
@ -119,17 +117,15 @@ void InterfaceTree::hideEvent(QHideEvent *evt) {
#endif // HAVE_LIBPCAP #endif // HAVE_LIBPCAP
} }
void InterfaceTree::showEvent(QShowEvent *evt) { void InterfaceTree::showEvent(QShowEvent *) {
Q_UNUSED(evt);
#ifdef HAVE_LIBPCAP #ifdef HAVE_LIBPCAP
if (stat_timer_) stat_timer_->start(stat_update_interval_); if (stat_timer_) stat_timer_->start(stat_update_interval_);
#endif // HAVE_LIBPCAP #endif // HAVE_LIBPCAP
} }
#include <QDebug> #include <QDebug>
void InterfaceTree::resizeEvent(QResizeEvent *evt) void InterfaceTree::resizeEvent(QResizeEvent *)
{ {
Q_UNUSED(evt);
int max_if_width = width() * 2 / 3; // Arbitrary int max_if_width = width() * 2 / 3; // Arbitrary
setUpdatesEnabled(false); setUpdatesEnabled(false);

View File

@ -155,8 +155,7 @@ static uat_field_t io_graph_fields[] = {
UAT_END_FIELDS UAT_END_FIELDS
}; };
static void* io_graph_copy_cb(void* dst_ptr, const void* src_ptr, size_t len) { static void* io_graph_copy_cb(void* dst_ptr, const void* src_ptr, size_t) {
Q_UNUSED(len);
io_graph_settings_t* dst = (io_graph_settings_t *)dst_ptr; io_graph_settings_t* dst = (io_graph_settings_t *)dst_ptr;
const io_graph_settings_t* src = (const io_graph_settings_t *)src_ptr; const io_graph_settings_t* src = (const io_graph_settings_t *)src_ptr;
@ -884,9 +883,8 @@ void IOGraphDialog::mouseReleased(QMouseEvent *event)
} }
} }
void IOGraphDialog::focusChanged(QWidget *previous, QWidget *current) void IOGraphDialog::focusChanged(QWidget *, QWidget *current)
{ {
Q_UNUSED(previous);
QTreeWidgetItem *item = ui->graphTreeWidget->currentItem(); QTreeWidgetItem *item = ui->graphTreeWidget->currentItem();
if (!item) { if (!item) {
return; return;
@ -1119,10 +1117,8 @@ void IOGraphDialog::comboDestroyed()
} }
} }
void IOGraphDialog::on_intervalComboBox_currentIndexChanged(int index) void IOGraphDialog::on_intervalComboBox_currentIndexChanged(int)
{ {
Q_UNUSED(index);
int interval = ui->intervalComboBox->itemData(ui->intervalComboBox->currentIndex()).toInt(); int interval = ui->intervalComboBox->itemData(ui->intervalComboBox->currentIndex()).toInt();
bool need_retap = false; bool need_retap = false;
@ -1158,10 +1154,8 @@ void IOGraphDialog::on_todCheckBox_toggled(bool checked)
ui->ioPlot->xAxis->moveRange(start_time_ - orig_start); ui->ioPlot->xAxis->moveRange(start_time_ - orig_start);
} }
void IOGraphDialog::on_graphTreeWidget_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous) void IOGraphDialog::on_graphTreeWidget_currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *previous)
{ {
Q_UNUSED(current);
if (previous && ui->graphTreeWidget->itemWidget(previous, name_col_)) { if (previous && ui->graphTreeWidget->itemWidget(previous, name_col_)) {
itemEditingFinished(previous); itemEditingFinished(previous);
} }
@ -2106,9 +2100,8 @@ void IOGraph::tapReset(void *iog_ptr)
} }
// "tap_packet" callback for register_tap_listener // "tap_packet" callback for register_tap_listener
gboolean IOGraph::tapPacket(void *iog_ptr, packet_info *pinfo, epan_dissect_t *edt, const void *data) gboolean IOGraph::tapPacket(void *iog_ptr, packet_info *pinfo, epan_dissect_t *edt, const void *)
{ {
Q_UNUSED(data);
IOGraph *iog = static_cast<IOGraph *>(iog_ptr); IOGraph *iog = static_cast<IOGraph *>(iog_ptr);
if (!pinfo || !iog) { if (!pinfo || !iog) {
return FALSE; return FALSE;