]> The Tcpdump Group git mirrors - tcpdump/commitdiff
tcpdump.c: Fix a warning when HAVE_FORK and HAVE_VFORK are not defined
authorFrancois-Xavier Le Bail <[email protected]>
Thu, 3 Apr 2025 06:23:03 +0000 (08:23 +0200)
committerfxlb <[email protected]>
Fri, 4 Apr 2025 18:48:18 +0000 (18:48 +0000)
The warning was:
tcpdump.c:226:13: warning: unused function 'child_cleanup'
  [-Wunused-function] static void child_cleanup(int);

tcpdump.c

index 36c7325967cb4fa5f845ff8b47e54241f181c153..d2af6e6908b45140df68e5452c06281cbf7bc34e 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -225,7 +225,9 @@ static int64_t parse_int64(const char *argname, const char *string,
     char **endp, int64_t minval, int64_t maxval, int base);
 static void (*setsignal (int sig, void (*func)(int)))(int);
 static void cleanup(int);
+#if defined(HAVE_FORK) || defined(HAVE_VFORK)
 static void child_cleanup(int);
+#endif
 static void print_version(FILE *);
 static void print_usage(FILE *);