From owner-svn-src-user@freebsd.org Wed Jun 8 16:03:05 2016 Return-Path: Delivered-To: svn-src-user@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 8A79FB6F2BD for ; Wed, 8 Jun 2016 16:03:05 +0000 (UTC) (envelope-from pho@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 3F1771EED; Wed, 8 Jun 2016 16:03:05 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u58G34d2096829; Wed, 8 Jun 2016 16:03:04 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58G34Rh096826; Wed, 8 Jun 2016 16:03:04 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201606081603.u58G34Rh096826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Wed, 8 Jun 2016 16:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r301637 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 16:03:05 -0000 Author: pho Date: Wed Jun 8 16:03:04 2016 New Revision: 301637 URL: https://svnweb.freebsd.org/changeset/base/301637 Log: Fixed issues flagged by gcc. Sponsored by: EMC / Isilon Storage Division Modified: user/pho/stress2/misc/context2.sh user/pho/stress2/misc/nfs15.sh user/pho/stress2/misc/nfs16.sh Modified: user/pho/stress2/misc/context2.sh ============================================================================== --- user/pho/stress2/misc/context2.sh Wed Jun 8 15:41:39 2016 (r301636) +++ user/pho/stress2/misc/context2.sh Wed Jun 8 16:03:04 2016 (r301637) @@ -78,7 +78,7 @@ thr_routine(void *arg) int i; int token; - i = (int)arg; + i = (long)arg; for (;;) { if (read(fds[i][0], &token, sizeof(token)) != sizeof(token)) err(1, "read pipe 2"); @@ -94,6 +94,7 @@ main(void) { pthread_t threads[NTHREADS]; time_t start; + long arg; int i, r, token; for (i = 0; i < NTHREADS + 1; i++) { @@ -101,10 +102,12 @@ main(void) err(1, "pipe"); } - for (i = 0; i < NTHREADS; i++) + for (i = 0; i < NTHREADS; i++) { + arg = i; if ((r = pthread_create(&threads[i], NULL, thr_routine, - (void *)i)) != 0) + (void *)arg)) != 0) errc(1, r, "pthread_create(): %s\n", strerror(r)); + } start = time(NULL); Modified: user/pho/stress2/misc/nfs15.sh ============================================================================== --- user/pho/stress2/misc/nfs15.sh Wed Jun 8 15:41:39 2016 (r301636) +++ user/pho/stress2/misc/nfs15.sh Wed Jun 8 16:03:04 2016 (r301637) @@ -118,7 +118,7 @@ t2(void *data __unused) err(1, "open(%s)", file); do { r = lockf(fd, F_LOCK, 0); - } while (r == -1 & errno == EDEADLK); + } while (r == -1 && errno == EDEADLK); if (r == -1) err(1, "lockf(%s, F_LOCK)", file); write(fd, "x", 1); Modified: user/pho/stress2/misc/nfs16.sh ============================================================================== --- user/pho/stress2/misc/nfs16.sh Wed Jun 8 15:41:39 2016 (r301636) +++ user/pho/stress2/misc/nfs16.sh Wed Jun 8 16:03:04 2016 (r301637) @@ -112,7 +112,7 @@ t2(void *data __unused) err(1, "open(%s)", file); do { r = lockf(fd, F_LOCK, 0); - } while (r == -1 & errno == EDEADLK); + } while (r == -1 && errno == EDEADLK); if (r == -1) err(1, "lockf(%s, F_LOCK)", file); write(fd, "x", 1);