From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 03:38:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25CDC564; Sat, 11 Apr 2015 03:38:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 EBE06197; Sat, 11 Apr 2015 03:38:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B3coVa035375; Sat, 11 Apr 2015 03:38:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B3co8p035373; Sat, 11 Apr 2015 03:38:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110338.t3B3co8p035373@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 03:38:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281399 - head/tools/regression/sockets/unix_bindconnect 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.18-1 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: Sat, 11 Apr 2015 03:38:51 -0000 Author: ngie Date: Sat Apr 11 03:38:49 2015 New Revision: 281399 URL: https://svnweb.freebsd.org/changeset/base/281399 Log: Fix warnings and bump WARNS to 6 - Staticize variables as needed - Garbage collect argc/argv - Fix -Wsign-compare warnings by casting small sizeof to (int) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/unix_bindconnect/Makefile head/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c Modified: head/tools/regression/sockets/unix_bindconnect/Makefile ============================================================================== --- head/tools/regression/sockets/unix_bindconnect/Makefile Sat Apr 11 03:35:33 2015 (r281398) +++ head/tools/regression/sockets/unix_bindconnect/Makefile Sat Apr 11 03:38:49 2015 (r281399) @@ -2,6 +2,6 @@ PROG= unix_bindconnect MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: head/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c ============================================================================== --- head/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c Sat Apr 11 03:35:33 2015 (r281398) +++ head/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c Sat Apr 11 03:38:49 2015 (r281399) @@ -54,8 +54,8 @@ #define UNWIND_MAX 1024 -int unwind_len; -struct unwind { +static int unwind_len; +static struct unwind { char u_path[PATH_MAX]; } unwind_list[UNWIND_MAX]; @@ -105,7 +105,7 @@ bind_test(const char *directory_path) sun.sun_len = sizeof(sun); sun.sun_family = AF_UNIX; if (snprintf(sun.sun_path, sizeof(sun.sun_path), "%s", socket_path) - >= sizeof(sun.sun_path)) { + >= (int)sizeof(sun.sun_path)) { warn("bind_test: snprintf(sun.sun_path)"); close(sock1); return (-1); @@ -216,7 +216,7 @@ connect_test(const char *directory_path) sun.sun_len = sizeof(sun); sun.sun_family = AF_UNIX; if (snprintf(sun.sun_path, sizeof(sun.sun_path), "%s", socket_path) - >= sizeof(sun.sun_path)) { + >= (int)sizeof(sun.sun_path)) { warn("connect_test: snprintf(sun.sun_path)"); close(sock1); return (-1); @@ -298,7 +298,7 @@ connect_test(const char *directory_path) return (0); } int -main(int argc, char *argv[]) +main(void) { char directory_path[PATH_MAX]; int error;