From 0863153c91830c8a3536b07ce600dd0c582f984e Mon Sep 17 00:00:00 2001 From: Michal Mazurek Date: Sun, 28 May 2017 07:17:54 +0000 Subject: print_ioctl() is unused if not debugging. Found with clang, after marking the function "static". Use OSFP_DEBUG, in a similar fashion to OPT_DEBUG (pfctl_optimize.c). OK bluhm@ --- sbin/pfctl/pfctl_osfp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sbin/pfctl/pfctl_osfp.c') diff --git a/sbin/pfctl/pfctl_osfp.c b/sbin/pfctl/pfctl_osfp.c index e89a047ed3a..9c51d7462eb 100644 --- a/sbin/pfctl/pfctl_osfp.c +++ b/sbin/pfctl/pfctl_osfp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_osfp.c,v 1.24 2017/05/27 19:38:38 akfaew Exp $ */ +/* $OpenBSD: pfctl_osfp.c,v 1.25 2017/05/28 07:17:53 akfaew Exp $ */ /* * Copyright (c) 2003 Mike Frantzen @@ -38,7 +38,8 @@ #define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) -#if 0 +/* #define OSFP_DEBUG 1 */ +#ifdef OSFP_DEBUG # define DEBUG(fp, str, v...) \ fprintf(stderr, "%s:%s:%s " str "\n", (fp)->fp_os.fp_class_nm, \ (fp)->fp_os.fp_version_nm, (fp)->fp_os.fp_subtype_nm , ## v); @@ -73,7 +74,9 @@ int get_tcpopts(const char *, int, const char *, pf_tcpopts_t *, int *, int *, int *, int *, int *, int *); void import_fingerprint(struct pf_osfp_ioctl *); +#ifdef OSFP_DEBUG const char *print_ioctl(struct pf_osfp_ioctl *); +#endif void print_name_list(int, struct name_list *, const char *); void sort_name_list(int, struct name_list *); struct name_entry *lookup_name_list(struct name_list *, const char *); @@ -989,6 +992,7 @@ get_field(char **line, size_t *len, int *fieldlen) } +#ifdef OSFP_DEBUG const char * print_ioctl(struct pf_osfp_ioctl *fp) { @@ -1090,3 +1094,4 @@ print_ioctl(struct pf_osfp_ioctl *fp) return (buf); } +#endif -- cgit v1.2.3