svn commit: trunk/uClibc/test/misc

kraj at uclibc.org kraj at uclibc.org
Thu Mar 8 08:55:53 UTC 2007


Author: kraj
Date: 2007-03-08 00:55:52 -0800 (Thu, 08 Mar 2007)
New Revision: 18035

Log:
Now Test.mak includes toplevel Rules.mak so if DO_ASSERT is not set then -DNDEBUG is added
to CFLAGS so we need to get the seeko() calls out of the assert otherwise they get
cancelled when NDEBUG is defined.


Modified:
   trunk/uClibc/test/misc/seek.c


Changeset:
Modified: trunk/uClibc/test/misc/seek.c
===================================================================
--- trunk/uClibc/test/misc/seek.c	2007-03-08 02:04:50 UTC (rev 18034)
+++ trunk/uClibc/test/misc/seek.c	2007-03-08 08:55:52 UTC (rev 18035)
@@ -23,6 +23,7 @@
 	off_t ret;
 	int i, fd;
 	FILE *fp;
+	int tmp;
 
 	fd = open("lseek.out", O_RDWR|O_CREAT, 0600);
 	if (fd == -1) {
@@ -44,8 +45,10 @@
 		return 1;
 	}
 
-	assert(fseeko(fp, 1024, SEEK_SET) == 0);
-	assert(fseeko(fp, (off_t)-16, SEEK_CUR) == 0);
+	tmp = fseeko(fp, 1024, SEEK_SET);
+	assert(tmp == 0);
+	tmp = fseeko(fp, (off_t)-16, SEEK_CUR);
+	assert(tmp == 0);
 	ret = ftell(fp);
 	if (ret != (1024-16)) {
 		fprintf(stderr, "ftell() failed, we wanted pos %i but got %li: ", (1024-16), (long)ret);




More information about the uClibc-cvs mailing list