From owner-svn-src-head@freebsd.org Mon Dec 28 02:21:37 2015 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 C7F74A4C1C6; Mon, 28 Dec 2015 02:21:37 +0000 (UTC) (envelope-from ngie@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 945071532; Mon, 28 Dec 2015 02:21:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBS2LaHP099019; Mon, 28 Dec 2015 02:21:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBS2LaTC099018; Mon, 28 Dec 2015 02:21:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512280221.tBS2LaTC099018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 28 Dec 2015 02:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292819 - head/tests/sys/aio 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.20 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: Mon, 28 Dec 2015 02:21:37 -0000 Author: ngie Date: Mon Dec 28 02:21:36 2015 New Revision: 292819 URL: https://svnweb.freebsd.org/changeset/base/292819 Log: - Fix an improperly sized buffer for `pathname` [1] - Fix a -Wunused-but-set-variable warning [2] MFC after: 1 week Reported by: cppcheck [1], gcc 4.9 [2] Sponsored by: EMC / Isilon Storage Division Modified: head/tests/sys/aio/lio_kqueue_test.c Modified: head/tests/sys/aio/lio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/lio_kqueue_test.c Mon Dec 28 02:18:22 2015 (r292818) +++ head/tests/sys/aio/lio_kqueue_test.c Mon Dec 28 02:21:36 2015 (r292819) @@ -62,7 +62,7 @@ main(int argc, char *argv[]) { int fd; struct aiocb *iocb[MAX_IOCBS]; - struct aiocb **lio[LIO_MAX], **lio_element, **kq_lio; + struct aiocb **lio[LIO_MAX], **kq_lio; int i, result, run, error, j, k; char buffer[32768]; int kq; @@ -70,7 +70,7 @@ main(int argc, char *argv[]) struct timespec ts; struct sigevent sig; time_t time1, time2; - char *file, pathname[sizeof(PATH_TEMPLATE)-1]; + char *file, pathname[sizeof(PATH_TEMPLATE)]; int tmp_file = 0, failed = 0; PLAIN_REQUIRE_KERNEL_MODULE("aio", 0); @@ -104,7 +104,6 @@ main(int argc, char *argv[]) malloc(sizeof(struct aiocb *) * MAX_IOCBS/LIO_MAX); for (i = 0; i < MAX_IOCBS / LIO_MAX; i++) { k = (MAX_IOCBS / LIO_MAX * j) + i; - lio_element = lio[j]; lio[j][i] = iocb[k] = calloc(1, sizeof(struct aiocb)); iocb[k]->aio_nbytes = sizeof(buffer);