From owner-svn-src-head@freebsd.org Fri Jun 16 22:32:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 377B8D8A876; Fri, 16 Jun 2017 22:32:25 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D94D7272F; Fri, 16 Jun 2017 22:32:24 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5GMWO0t098366; Fri, 16 Jun 2017 22:32:24 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5GMWNbV098362; Fri, 16 Jun 2017 22:32:23 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201706162232.v5GMWNbV098362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 16 Jun 2017 22:32:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320033 - head/contrib/tcp_wrappers X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jun 2017 22:32:25 -0000 Author: sbruno Date: Fri Jun 16 22:32:23 2017 New Revision: 320033 URL: https://svnweb.freebsd.org/changeset/base/320033 Log: TCP Wrappers: tcpdchk (tcp wrapper configuration checker) and tcpdmatch (tcp wrapper oracle) warning fixes via edits to the C code files contrib/tcp_wrappers/fakelog.c Warnings for each of functions: openlog( ), vsyslog( ), VARARGS( ), closelog( ) warning: type specifier missing, defaults to 'int' [-Wimplicit-int] warning: control reaches end of non-void function [-Wreturn-type] Fixes: Explicitly added specification of function type to void for each function, suppressing both warnings for each function listed contrib/tcp_wrappers/inetcf.c Warnings: warning: incompativle redeclaration of library function 'malloc' note: 'malloc' is a builtin with type 'void *(unsigned long)' warning: implicit declaration of function 'check_path' is invalid in C99 [-Wimplicit-function-declaration] Fixes: Removed redeclaration of malloc on line 21 Included library in the code which contains the malloc( ) function in it's library Included scaffold.h header file in the code that contains check-path( ) function contrib/tcp_wrappers/scaffold.c Warnings: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Wimplicit-function-declaration] note: include the header or explicitly provide a declaration for 'exit' Fixes: Included in the code which contains the exit( ) function in it's library contrib/tcp_wrappers/tcpdchk.c Warnings: warning: implicit declaration of function 'getopt' is invalid in C99 [-Wimplicit-function-declaration] warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration] Fixes: Included the specific function library to the code Included to the code which contains the atoi( ) function in the library contrib/tcp_wrappers/tcpdmatch.c Warnings: warning: implicit declaration of function 'getopt' is invalid in C99 [-Wimplicit-function-declaration] Fixes: Included to the code which contains the getopt( ) function in the library Submitted by: Aaron Prieger Reviewed by: vangyzen Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D10995 Modified: head/contrib/tcp_wrappers/fakelog.c head/contrib/tcp_wrappers/inetcf.c head/contrib/tcp_wrappers/scaffold.c head/contrib/tcp_wrappers/tcpdchk.c head/contrib/tcp_wrappers/tcpdmatch.c Modified: head/contrib/tcp_wrappers/fakelog.c ============================================================================== --- head/contrib/tcp_wrappers/fakelog.c Fri Jun 16 22:07:14 2017 (r320032) +++ head/contrib/tcp_wrappers/fakelog.c Fri Jun 16 22:32:23 2017 (r320033) @@ -17,7 +17,7 @@ static char sccsid[] = "@(#) fakelog.c 1.3 94/12/28 17 /* ARGSUSED */ -openlog(name, logopt, facility) +void openlog(name, logopt, facility) char *name; int logopt; int facility; @@ -27,7 +27,7 @@ int facility; /* vsyslog - format one record */ -vsyslog(severity, fmt, ap) +void vsyslog(severity, fmt, ap) int severity; char *fmt; va_list ap; @@ -43,7 +43,7 @@ va_list ap; /* VARARGS */ -VARARGS(syslog, int, severity) +void VARARGS(syslog, int, severity) { va_list ap; char *fmt; @@ -56,7 +56,7 @@ VARARGS(syslog, int, severity) /* closelog - dummy */ -closelog() +void closelog() { /* void */ } Modified: head/contrib/tcp_wrappers/inetcf.c ============================================================================== --- head/contrib/tcp_wrappers/inetcf.c Fri Jun 16 22:07:14 2017 (r320032) +++ head/contrib/tcp_wrappers/inetcf.c Fri Jun 16 22:32:23 2017 (r320033) @@ -15,13 +15,14 @@ static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02: #include #include #include +#include extern int errno; extern void exit(); -extern char *malloc(); #include "tcpd.h" #include "inetcf.h" +#include "scaffold.h" /* * Network configuration files may live in unusual places. Here are some Modified: head/contrib/tcp_wrappers/scaffold.c ============================================================================== --- head/contrib/tcp_wrappers/scaffold.c Fri Jun 16 22:07:14 2017 (r320032) +++ head/contrib/tcp_wrappers/scaffold.c Fri Jun 16 22:32:23 2017 (r320033) @@ -22,6 +22,7 @@ static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 #include #include #include +#include #ifndef INADDR_NONE #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ Modified: head/contrib/tcp_wrappers/tcpdchk.c ============================================================================== --- head/contrib/tcp_wrappers/tcpdchk.c Fri Jun 16 22:07:14 2017 (r320032) +++ head/contrib/tcp_wrappers/tcpdchk.c Fri Jun 16 22:32:23 2017 (r320033) @@ -35,6 +35,8 @@ static char sccsid[] = "@(#) tcpdchk.c 1.8 97/02/12 02 #include #include #include +#include +#include extern int errno; extern void exit(); Modified: head/contrib/tcp_wrappers/tcpdmatch.c ============================================================================== --- head/contrib/tcp_wrappers/tcpdmatch.c Fri Jun 16 22:07:14 2017 (r320032) +++ head/contrib/tcp_wrappers/tcpdmatch.c Fri Jun 16 22:32:23 2017 (r320033) @@ -31,6 +31,7 @@ static char sccsid[] = "@(#) tcpdmatch.c 1.5 96/02/11 #include #include #include +#include extern void exit(); extern int optind;