aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>2012-08-23 10:30:37 +0000
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>2012-08-23 10:30:37 +0000
commit09a7ac4891d814a3e743c33a094e65ff87ce2293 (patch)
tree52ad60480e13cdfcd770131f394acccf243f9174
parentbbc5b12fa67327e4164746dbde615a7e51a17ae3 (diff)
Fixes for warnings: unused-but-set-variable
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44628 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--ui/qt/CMakeLists.txt12
-rw-r--r--ui/qt/byte_view_text.cpp4
-rw-r--r--ui/qt/main.cpp10
-rw-r--r--ui/qt/main_welcome.cpp4
4 files changed, 20 insertions, 10 deletions
diff --git a/ui/qt/CMakeLists.txt b/ui/qt/CMakeLists.txt
index 34bc8037c0..d6bd7e0cf2 100644
--- a/ui/qt/CMakeLists.txt
+++ b/ui/qt/CMakeLists.txt
@@ -124,8 +124,7 @@ QT4_WRAP_CPP(QTSHARK_MOC_SRC ${QTSHARK_H_SRC})
# set_target_properties(${some-source-files} PROPERTIES AUTOMOC TRUE)
set(CLEAN_FILES
- # It's too early to care about clean files
- # ${QTSHARK_SRC}
+ ${QTSHARK_SRC}
)
if (WERROR)
@@ -136,7 +135,14 @@ if (WERROR)
)
endif()
-ADD_DEFINITIONS(${QT_DEFINITIONS})
+add_definitions(${QT_DEFINITIONS})
+
+# Get rid of C-only compile flags
+remove_definitions(
+ -Wdeclaration-after-statement
+ -Wno-pointer-sign
+ -Wold-style-definition
+)
add_library(qtui STATIC
${QTSHARK_SRC}
diff --git a/ui/qt/byte_view_text.cpp b/ui/qt/byte_view_text.cpp
index f0f6a4ccbb..cbe09a7245 100644
--- a/ui/qt/byte_view_text.cpp
+++ b/ui/qt/byte_view_text.cpp
@@ -323,7 +323,7 @@ void ByteViewText::highlight(int bstart, int blen, bool is_root) {
int bend = bstart + blen;
int per_line = 0;
int per_one = 0;
- int bits_per_one = 0;
+// int bits_per_one = 0;
int hex_offset, ascii_offset;
int start_line, start_line_pos;
@@ -342,7 +342,7 @@ void ByteViewText::highlight(int bstart, int blen, bool is_root) {
// case BYTES_HEX:
per_line = BYTES_PER_LINE;
per_one = 2+1; /* "ff " */
- bits_per_one = 4;
+// bits_per_one = 4;
// break;
// case BYTES_BITS:
// per_line = BITS_PER_LINE;
diff --git a/ui/qt/main.cpp b/ui/qt/main.cpp
index 4eee037b47..bef9a9df37 100644
--- a/ui/qt/main.cpp
+++ b/ui/qt/main.cpp
@@ -623,7 +623,7 @@ int main(int argc, char *argv[])
WiresharkApplication a(argc, argv);
MainWindow *w;
- char *init_progfile_dir_error;
+// char *init_progfile_dir_error;
// char *s;
int opt;
// gboolean arg_error = FALSE;
@@ -632,7 +632,7 @@ int main(int argc, char *argv[])
// const gchar *filter;
#ifdef _WIN32
- WSADATA wsaData;
+ WSADATA wsaData;
#endif /* _WIN32 */
char *rf_path;
@@ -663,7 +663,7 @@ int main(int argc, char *argv[])
// guint go_to_packet = 0;
// gboolean jump_backwards = FALSE;
// dfilter_t *jump_to_filter = NULL;
- int optind_initial;
+// int optind_initial;
int status;
@@ -712,7 +712,7 @@ int main(int argc, char *argv[])
/*
* Attempt to get the pathname of the executable file.
*/
- init_progfile_dir_error = init_progfile_dir(argv[0], main);
+ /* init_progfile_dir_error = */ init_progfile_dir(argv[0], main);
g_log(NULL, G_LOG_LEVEL_DEBUG, "progfile_dir: %s", get_progfile_dir());
/* initialize the funnel mini-api */
@@ -810,7 +810,7 @@ int main(int argc, char *argv[])
We thus ignore errors - *and* set "opterr" to 0 to suppress the
error messages. */
opterr = 0;
- optind_initial = optind;
+ // optind_initial = optind;
while ((opt = getopt(argc, argv, optstring)) != -1) {
switch (opt) {
case 'C': /* Configuration Profile */
diff --git a/ui/qt/main_welcome.cpp b/ui/qt/main_welcome.cpp
index 74c5c0ff25..81ef96d57d 100644
--- a/ui/qt/main_welcome.cpp
+++ b/ui/qt/main_welcome.cpp
@@ -75,11 +75,15 @@ MainWelcome::MainWelcome(QWidget *parent) :
// QGridLayout *grid = new QGridLayout(this);
// QVBoxLayout *column;
// QLabel *heading;
+#ifdef Q_WS_MAC
InterfaceTree *iface_tree;
+#endif
welcome_ui_->setupUi(this);
task_list_ = welcome_ui_->taskList;
+#ifdef Q_WS_MAC
iface_tree = welcome_ui_->interfaceTree;
+#endif
recent_files_ = welcome_ui_->recentList;
setStyleSheet(QString(