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>
This commit is contained in:
Dario Lombardo 2018-12-20 18:31:18 +01:00 committed by Anders Broman
parent 8b652fe948
commit 036c3d6bc7
1 changed files with 1 additions and 1 deletions

View File

@ -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