diff options
author | Dario Lombardo <lomato@gmail.com> | 2018-01-03 15:05:03 +0100 |
---|---|---|
committer | Dario Lombardo <lomato@gmail.com> | 2018-01-04 13:20:26 +0000 |
commit | ba3830e03bad6e5e5cfb9d88342e9953efba520b (patch) | |
tree | 351e88c36f8f1b2ab87b4e5ffca96966b6ce4408 /ui/qt/wireshark_application.cpp | |
parent | 5a9edf2a91476453aaee3137b704a1af80b33a44 (diff) |
Qt: add conditional compilation in switches.
Compiling without pcap, the lack of all the cases causes an error.
../ui/qt/main_window_slots.cpp:756:13: error: enumeration values 'Capture',
'Update', and 'Fixed' not handled in switch [-Werror,-Wswitch]
switch (ev->captureContext()) {
^
1 error generated.
Change-Id: I36c0bc854b1d864ebf54ac59ca15743918bc7d2b
Reviewed-on: https://code.wireshark.org/review/25127
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Diffstat (limited to 'ui/qt/wireshark_application.cpp')
-rw-r--r-- | ui/qt/wireshark_application.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp index edf7bfe859..b2eb02ca79 100644 --- a/ui/qt/wireshark_application.cpp +++ b/ui/qt/wireshark_application.cpp @@ -1334,6 +1334,7 @@ void WiresharkApplication::captureEventHandler(CaptureEvent * ev) { switch(ev->captureContext()) { +#ifdef HAVE_LIBPCAP case CaptureEvent::Update: case CaptureEvent::Fixed: switch ( ev->eventType() ) @@ -1350,6 +1351,7 @@ void WiresharkApplication::captureEventHandler(CaptureEvent * ev) break; } break; +#endif case CaptureEvent::File: switch ( ev->eventType() ) { |