Commit d586fce3 authored by Philip Carns's avatar Philip Carns

fix pointer arithmetic for x86_64


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@188 3b7491f3-a168-0410-bf4b-c445ed680a29
parent ce22bb4e
...@@ -685,7 +685,7 @@ ssize_t __wrap_pread64(int fd, void *buf, size_t count, off_t offset) ...@@ -685,7 +685,7 @@ ssize_t __wrap_pread64(int fd, void *buf, size_t count, off_t offset)
int aligned_flag = 0; int aligned_flag = 0;
double tm1, tm2; double tm1, tm2;
if((int)buf % __CP_MEM_ALIGNMENT == 0) if((unsigned long)buf % __CP_MEM_ALIGNMENT == 0)
aligned_flag = 1; aligned_flag = 1;
tm1 = darshan_wtime(); tm1 = darshan_wtime();
...@@ -703,7 +703,7 @@ ssize_t __wrap_pread(int fd, void *buf, size_t count, off_t offset) ...@@ -703,7 +703,7 @@ ssize_t __wrap_pread(int fd, void *buf, size_t count, off_t offset)
int aligned_flag = 0; int aligned_flag = 0;
double tm1, tm2; double tm1, tm2;
if((int)buf % __CP_MEM_ALIGNMENT == 0) if((unsigned long)buf % __CP_MEM_ALIGNMENT == 0)
aligned_flag = 1; aligned_flag = 1;
tm1 = darshan_wtime(); tm1 = darshan_wtime();
...@@ -722,7 +722,7 @@ ssize_t __wrap_pwrite(int fd, const void *buf, size_t count, off_t offset) ...@@ -722,7 +722,7 @@ ssize_t __wrap_pwrite(int fd, const void *buf, size_t count, off_t offset)
int aligned_flag = 0; int aligned_flag = 0;
double tm1, tm2; double tm1, tm2;
if((int)buf % __CP_MEM_ALIGNMENT == 0) if((unsigned long)buf % __CP_MEM_ALIGNMENT == 0)
aligned_flag = 1; aligned_flag = 1;
tm1 = darshan_wtime(); tm1 = darshan_wtime();
...@@ -740,7 +740,7 @@ ssize_t __wrap_pwrite64(int fd, const void *buf, size_t count, off_t offset) ...@@ -740,7 +740,7 @@ ssize_t __wrap_pwrite64(int fd, const void *buf, size_t count, off_t offset)
int aligned_flag = 0; int aligned_flag = 0;
double tm1, tm2; double tm1, tm2;
if((int)buf % __CP_MEM_ALIGNMENT == 0) if((unsigned long)buf % __CP_MEM_ALIGNMENT == 0)
aligned_flag = 1; aligned_flag = 1;
tm1 = darshan_wtime(); tm1 = darshan_wtime();
...@@ -761,7 +761,7 @@ ssize_t __wrap_readv(int fd, const struct iovec *iov, int iovcnt) ...@@ -761,7 +761,7 @@ ssize_t __wrap_readv(int fd, const struct iovec *iov, int iovcnt)
for(i=0; i<iovcnt; i++) for(i=0; i<iovcnt; i++)
{ {
if(((int)iov[i].iov_base % __CP_MEM_ALIGNMENT) != 0) if(((unsigned long)iov[i].iov_base % __CP_MEM_ALIGNMENT) != 0)
aligned_flag = 0; aligned_flag = 0;
} }
...@@ -783,7 +783,7 @@ ssize_t __wrap_writev(int fd, const struct iovec *iov, int iovcnt) ...@@ -783,7 +783,7 @@ ssize_t __wrap_writev(int fd, const struct iovec *iov, int iovcnt)
for(i=0; i<iovcnt; i++) for(i=0; i<iovcnt; i++)
{ {
if(!((int)iov[i].iov_base % __CP_MEM_ALIGNMENT == 0)) if(!((unsigned long)iov[i].iov_base % __CP_MEM_ALIGNMENT == 0))
aligned_flag = 0; aligned_flag = 0;
} }
...@@ -802,7 +802,7 @@ size_t __wrap_fread(void *ptr, size_t size, size_t nmemb, FILE *stream) ...@@ -802,7 +802,7 @@ size_t __wrap_fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
int aligned_flag = 0; int aligned_flag = 0;
double tm1, tm2; double tm1, tm2;
if((int)ptr % __CP_MEM_ALIGNMENT == 0) if((unsigned long)ptr % __CP_MEM_ALIGNMENT == 0)
aligned_flag = 1; aligned_flag = 1;
tm1 = darshan_wtime(); tm1 = darshan_wtime();
...@@ -823,7 +823,7 @@ ssize_t __wrap_read(int fd, void *buf, size_t count) ...@@ -823,7 +823,7 @@ ssize_t __wrap_read(int fd, void *buf, size_t count)
int aligned_flag = 0; int aligned_flag = 0;
double tm1, tm2; double tm1, tm2;
if((int)buf % __CP_MEM_ALIGNMENT == 0) if((unsigned long)buf % __CP_MEM_ALIGNMENT == 0)
aligned_flag = 1; aligned_flag = 1;
tm1 = darshan_wtime(); tm1 = darshan_wtime();
...@@ -841,7 +841,7 @@ ssize_t __wrap_write(int fd, const void *buf, size_t count) ...@@ -841,7 +841,7 @@ ssize_t __wrap_write(int fd, const void *buf, size_t count)
int aligned_flag = 0; int aligned_flag = 0;
double tm1, tm2; double tm1, tm2;
if((int)buf % __CP_MEM_ALIGNMENT == 0) if((unsigned long)buf % __CP_MEM_ALIGNMENT == 0)
aligned_flag = 1; aligned_flag = 1;
tm1 = darshan_wtime(); tm1 = darshan_wtime();
...@@ -859,7 +859,7 @@ size_t __wrap_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) ...@@ -859,7 +859,7 @@ size_t __wrap_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)
int aligned_flag = 0; int aligned_flag = 0;
double tm1, tm2; double tm1, tm2;
if((int)ptr % __CP_MEM_ALIGNMENT == 0) if((unsigned long)ptr % __CP_MEM_ALIGNMENT == 0)
aligned_flag = 1; aligned_flag = 1;
tm1 = darshan_wtime(); tm1 = darshan_wtime();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment