summaryrefslogtreecommitdiff
path: root/test/misc
diff options
context:
space:
mode:
authorKhem Raj <kraj@mvista.com>2007-03-08 08:55:52 +0000
committerKhem Raj <kraj@mvista.com>2007-03-08 08:55:52 +0000
commit449af02b4cd365fa95f38ffba8af47be49ca9316 (patch)
tree546f7d24ec97e5f1f5f27f545608d786b9d5757c /test/misc
parent78a11bc1915300ec68917ab9bf6e0dc1cb84a317 (diff)
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.
Diffstat (limited to 'test/misc')
-rw-r--r--test/misc/seek.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/misc/seek.c b/test/misc/seek.c
index f3f5d20df..c5edb94c9 100644
--- a/test/misc/seek.c
+++ b/test/misc/seek.c
@@ -23,6 +23,7 @@ int main(void)
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 @@ int main(void)
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);