From owner-svn-src-stable@FreeBSD.ORG Wed Aug 7 06:39:19 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E3B6494D; Wed, 7 Aug 2013 06:39:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B5B8B2A6D; Wed, 7 Aug 2013 06:39:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r776dJ3W061804; Wed, 7 Aug 2013 06:39:19 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r776dJZ0061802; Wed, 7 Aug 2013 06:39:19 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308070639.r776dJZ0061802@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Aug 2013 06:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r254030 - stable/9/tools/regression/aio/aiotest X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Aug 2013 06:39:20 -0000 Author: kib Date: Wed Aug 7 06:39:19 2013 New Revision: 254030 URL: http://svnweb.freebsd.org/changeset/base/254030 Log: MFC r253526: Fix several warnings. Fix crash in aio_pty_cleanup() by initializing the pointer before dereferencing. Modified: stable/9/tools/regression/aio/aiotest/aiotest.c Directory Properties: stable/9/tools/regression/aio/aiotest/ (props changed) Modified: stable/9/tools/regression/aio/aiotest/aiotest.c ============================================================================== --- stable/9/tools/regression/aio/aiotest/aiotest.c Wed Aug 7 06:36:48 2013 (r254029) +++ stable/9/tools/regression/aio/aiotest/aiotest.c Wed Aug 7 06:39:19 2013 (r254030) @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -269,7 +270,7 @@ aio_write_test(struct aio_context *ac) if (len != ac->ac_buflen) { aio_cleanup(ac); errx(-1, "FAIL: %s: aio_write_test: aio_waitcomplete: short " - "write (%d)", ac->ac_test, len); + "write (%jd)", ac->ac_test, (intmax_t)len); } } @@ -329,7 +330,7 @@ aio_read_test(struct aio_context *ac) if (len != ac->ac_buflen) { aio_cleanup(ac); errx(-1, "FAIL: %s: aio_read_test: aio_waitcomplete: short " - "read (%d)", ac->ac_test, len); + "read (%jd)", ac->ac_test, (intmax_t)len); } if (aio_test_buffer(ac->ac_buffer, ac->ac_buflen, ac->ac_seed) == 0) { @@ -366,7 +367,7 @@ aio_file_cleanup(void *arg) #define FILE_LEN GLOBAL_MAX #define FILE_TIMEOUT 30 -static int +static void aio_file_test(void) { char pathname[PATH_MAX]; @@ -414,7 +415,7 @@ aio_fifo_cleanup(void *arg) #define FIFO_LEN 256 #define FIFO_TIMEOUT 30 -static int +static void aio_fifo_test(void) { int error, read_fd = -1, write_fd = -1; @@ -481,7 +482,7 @@ aio_unix_socketpair_cleanup(void *arg) #define UNIX_SOCKETPAIR_LEN 256 #define UNIX_SOCKETPAIR_TIMEOUT 30 -static int +static void aio_unix_socketpair_test(void) { struct aio_unix_socketpair_arg arg; @@ -515,13 +516,14 @@ aio_pty_cleanup(void *arg) { struct aio_pty_arg *apa; + apa = arg; close(apa->apa_read_fd); close(apa->apa_write_fd); }; #define PTY_LEN 256 #define PTY_TIMEOUT 30 -static int +static void aio_pty_test(void) { struct aio_pty_arg arg; @@ -573,7 +575,7 @@ aio_pipe_cleanup(void *arg) #define PIPE_LEN 256 #define PIPE_TIMEOUT 30 -static int +static void aio_pipe_test(void) { struct aio_context ac; @@ -628,7 +630,7 @@ aio_md_cleanup(void *arg) #define MD_LEN GLOBAL_MAX #define MD_TIMEOUT 30 -static int +static void aio_md_test(void) { int error, fd, i, mdctl_fd, unit;