Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jan 2017 12:26:22 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r312919 - head/tests/sys/aio
Message-ID:  <201701281226.v0SCQMOG066157@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rwatson
Date: Sat Jan 28 12:26:22 2017
New Revision: 312919
URL: https://svnweb.freebsd.org/changeset/base/312919

Log:
  Fix build of aio_test on MIPS, where the compiler warns about the local
  variable 'err' shadowing the global function err(3).  Which it does.
  
  Sponsored by:	DARPA, AFRL

Modified:
  head/tests/sys/aio/aio_test.c

Modified: head/tests/sys/aio/aio_test.c
==============================================================================
--- head/tests/sys/aio/aio_test.c	Sat Jan 28 11:38:51 2017	(r312918)
+++ head/tests/sys/aio/aio_test.c	Sat Jan 28 12:26:22 2017	(r312919)
@@ -188,31 +188,31 @@ aio_context_init(struct aio_context *ac,
 
 static ssize_t
 poll(struct aiocb *aio) {
-	int err;
+	int error;
 
-	while ((err = aio_error(aio)) == EINPROGRESS && !aio_timedout)
+	while ((error = aio_error(aio)) == EINPROGRESS && !aio_timedout)
 		usleep(25000);
-	switch (err) {
+	switch (error) {
 		case EINPROGRESS:
 			errno = EINTR;
 			return (-1);
 		case 0:
 			return (aio_return(aio));
 		default:
-			return (err);
+			return (error);
 	}
 }
 
 static ssize_t
 suspend(struct aiocb *aio) {
 	const struct aiocb *const iocbs[] = {aio};
-	int err;
+	int error;
 
-	err = aio_suspend(iocbs, 1, NULL);
-	if (err == 0)
+	error = aio_suspend(iocbs, 1, NULL);
+	if (error == 0)
 		return (aio_return(aio));
 	else
-		return (err);
+		return (error);
 }
 
 static ssize_t



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701281226.v0SCQMOG066157>