Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 May 2013 06:58:10 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r250348 - user/pho/stress2/misc
Message-ID:  <201305080658.r486wATE080655@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Wed May  8 06:58:10 2013
New Revision: 250348
URL: http://svnweb.freebsd.org/changeset/base/250348

Log:
  Fix problem flaged by the compiler.

Modified:
  user/pho/stress2/misc/tmpfs6.sh

Modified: user/pho/stress2/misc/tmpfs6.sh
==============================================================================
--- user/pho/stress2/misc/tmpfs6.sh	Wed May  8 01:13:57 2013	(r250347)
+++ user/pho/stress2/misc/tmpfs6.sh	Wed May  8 06:58:10 2013	(r250348)
@@ -39,7 +39,7 @@
 odir=`pwd`
 cd /tmp
 sed '1,/^EOF/d' < $odir/$0 > tmpfs6.c
-cc -o tmpfs6 -Wall tmpfs6.c
+cc -o tmpfs6 -Wall -Wextra -O2  tmpfs6.c || exit 1
 rm -f tmpfs6.c
 
 mount | grep $mntpoint | grep -q tmpfs && umount $mntpoint
@@ -79,7 +79,7 @@ test(void)
 	if ((fd = open(filename, O_CREAT | O_TRUNC | O_RDWR, S_IRWXU)) == -1)
 		err(1, "open(%s)", filename);
 
-	if ((len = write(fd, wbuffer, FILESIZE)) != len)
+	if ((len = write(fd, wbuffer, FILESIZE)) != FILESIZE)
 		err(1, "write()");
 
 	fsync(fd);
@@ -90,7 +90,7 @@ test(void)
 	if (lseek(fd, 0, SEEK_SET) != 0)
 		err(1, "lseek()");
 
-	if ((len = write(fd, addr, FILESIZE)) != len)
+	if ((len = write(fd, addr, FILESIZE)) != FILESIZE)
 		err(1, "write() 2");
 
 	if (munmap(addr, FILESIZE) == -1)



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