aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2018-12-20 18:31:18 +0100
committerAnders Broman <a.broman58@gmail.com>2018-12-21 05:26:39 +0000
commit036c3d6bc7ef8fda1eb0506b923ac34f333e904e (patch)
treeadf3237b78dc5788adc30831e89ccdc538d26c62 /tshark.c
parent8b652fe948606d9b969d31fe3ba4574b479a9334 (diff)
tshark: fix compilation with gcc-8 without pcap.
Error: CMakeFiles/tshark.dir/tshark.c.o -c ../tshark.c ../tshark.c: In function 'real_main': ../tshark.c:706:24: error: variable 'max_packet_count' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered] int max_packet_count = 0; ^~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors ninja: build stopped: subcommand failed. Change-Id: I92c0e2a57f5d0d2e39188cc18f0b25e1d5136a43 Reviewed-on: https://code.wireshark.org/review/31149 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tshark.c b/tshark.c
index 1187050ac9..7933707771 100644
--- a/tshark.c
+++ b/tshark.c
@@ -703,7 +703,7 @@ real_main(int argc, char *argv[])
gchar *err_str;
#else
gboolean capture_option_specified = FALSE;
- int max_packet_count = 0;
+ volatile int max_packet_count = 0;
#endif
gboolean quiet = FALSE;
#ifdef PCAP_NG_DEFAULT