svn commit: r361065 - head/tests/sys/netpfil/pf/ioctl

Kyle Evans kevans at FreeBSD.org
Thu May 14 23:20:58 UTC 2020


Author: kevans
Date: Thu May 14 23:20:58 2020
New Revision: 361065
URL: https://svnweb.freebsd.org/changeset/base/361065

Log:
  pf tests: fix up a couple WARNS= 6 nits
  
  common_init_tbl is only used within this single CU, so it should be marked
  static.
  
  WARNS=6 also complained about the var defined by
  `ATF_TC_WITH_CLEANUP(getastats);` being unused, which turns out to be
  because it's not been hooked up in ATF_TP_ADD_TCS. kp@ did not immediately
  recall any reason for this, and the case passes on my local system, so hook
  it up.
  
  Note that I've not yet set WARNS= 6 here. Investigation is underway to see
  if we can feasibly default WARNS to 6 for src builds to catch directories
  too deep to inherit a WARNS from the top-level subdirectories' Makefile.inc.
  Those particular WARNS settings will be subsequently removed as they become
  redundant with a more-global default.
  
  MFC after:	1 week

Modified:
  head/tests/sys/netpfil/pf/ioctl/validation.c

Modified: head/tests/sys/netpfil/pf/ioctl/validation.c
==============================================================================
--- head/tests/sys/netpfil/pf/ioctl/validation.c	Thu May 14 22:18:12 2020	(r361064)
+++ head/tests/sys/netpfil/pf/ioctl/validation.c	Thu May 14 23:20:58 2020	(r361065)
@@ -51,7 +51,7 @@ static int dev;
 #define COMMON_CLEANUP() \
 	close(dev);
 
-void
+static void
 common_init_tbl(struct pfr_table *tbl)
 {
 	bzero(tbl, sizeof(struct pfr_table));
@@ -795,6 +795,7 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_ADD_TC(tp, addtables);
 	ATF_TP_ADD_TC(tp, deltables);
 	ATF_TP_ADD_TC(tp, gettables);
+	ATF_TP_ADD_TC(tp, getastats);
 	ATF_TP_ADD_TC(tp, gettstats);
 	ATF_TP_ADD_TC(tp, clrtstats);
 	ATF_TP_ADD_TC(tp, settflags);


More information about the svn-src-all mailing list