[Pvfs2-cvs] commit by vilayann in pvfs2-1/test/posix: vecio_test.c
xio_test.c
CVS commit program
cvs at parl.clemson.edu
Tue May 30 23:34:49 EDT 2006
Update of /projects/cvsroot/pvfs2-1/test/posix
In directory parlweb1:/tmp/cvs-serv26808/posix
Modified Files:
Tag: posix-extensions-branch
vecio_test.c xio_test.c
Log Message:
Fixes for x86_64 warnings.
Index: vecio_test.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/test/posix/Attic/vecio_test.c,v
diff -p -u -r1.1.2.1 -r1.1.2.2
--- vecio_test.c 31 May 2006 02:07:42 -0000 1.1.2.1
+++ vecio_test.c 31 May 2006 03:34:49 -0000 1.1.2.2
@@ -97,17 +97,17 @@ static int fillup_buffer(cm_frame_t *fra
}
for (c = 0; c < frame->cf_valid_count; c++)
{
- printf("(%d): Writing %p to %p [%d start %d bytes]\n",
+ printf("(%d): Writing %p to %p [%d start %ld bytes]\n",
c, wr_vector[c].iov_base,
wr_vector[c].iov_base + wr_vector[c].iov_len,
- frame->cf_valid_start[c], wr_vector[c].iov_len);
+ frame->cf_valid_start[c], (long) wr_vector[c].iov_len);
}
for (c = 0; c < frame->cf_valid_count; c++)
{
- printf("(%d): Reading %p to %p [%d start %d bytes]\n",
+ printf("(%d): Reading %p to %p [%d start %ld bytes]\n",
c, rd_vector[c].iov_base,
rd_vector[c].iov_base + rd_vector[c].iov_len,
- frame->cf_valid_start[c], rd_vector[c].iov_len);
+ frame->cf_valid_start[c], (long) rd_vector[c].iov_len);
}
printf("writev and readv should write %d bytes\n", should_be);
return should_be;
@@ -159,7 +159,7 @@ int main(int argc, char *argv[])
exit(1);
}
offset = rand() % max_offset;
- printf("Writing at offset %Ld\n", offset);
+ printf("Writing at offset %Ld\n", (long long) offset);
fd = open(fname, O_TRUNC | O_RDWR | O_CREAT, 0700);
if (fd < 0)
{
Index: xio_test.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/test/posix/Attic/xio_test.c,v
diff -p -u -r1.1.2.1 -r1.1.2.2
--- xio_test.c 31 May 2006 02:07:42 -0000 1.1.2.1
+++ xio_test.c 31 May 2006 03:34:49 -0000 1.1.2.2
@@ -211,7 +211,7 @@ int main(int argc, char *argv[])
fillup_buffers(&rdptr, nr_segs, 0);
wvec = (struct iovec *) malloc(nr_segs * sizeof(struct iovec));
rvec = (struct iovec *) malloc(nr_segs * sizeof(struct iovec));
- printf("Original iovec %d\n", sizeof(off_t));
+ printf("Original iovec %ld\n", (long) sizeof(off_t));
for (i = 0; i < nr_segs; i++)
{
wvec[i].iov_len = rand() % bufsize + 1;
@@ -220,8 +220,8 @@ int main(int argc, char *argv[])
rvec[i].iov_base = (char *) rdptr[i];
total += wvec[i].iov_len;
mem_total += wvec[i].iov_len;
- printf("%ld) <%p,%p> WRITE %d bytes\n", i, wvec[i].iov_base,
- wvec[i].iov_base + wvec[i].iov_len, wvec[i].iov_len);
+ printf("%ld) <%p,%p> WRITE %ld bytes\n", i, wvec[i].iov_base,
+ wvec[i].iov_base + wvec[i].iov_len, (long) wvec[i].iov_len);
}
xtnr_segs = str_ct;
xc = (struct xtvec *) malloc(xtnr_segs * sizeof(struct xtvec));
@@ -256,8 +256,8 @@ int main(int argc, char *argv[])
total_written = do_writex(wvec, nr_segs, xc, xtnr_segs);
for (i = 0; i < nr_segs; i++)
{
- printf("%ld) <%p,%p> READ %d bytes\n", i, rvec[i].iov_base,
- rvec[i].iov_base + rvec[i].iov_len, rvec[i].iov_len);
+ printf("%ld) <%p,%p> READ %ld bytes\n", i, rvec[i].iov_base,
+ rvec[i].iov_base + rvec[i].iov_len, (long) rvec[i].iov_len);
mem_total += rvec[i].iov_len;
}
if (xt_total != mem_total)
More information about the Pvfs2-cvs
mailing list