[Pkg-lustre-svn-commit] updated: [6d1ed66] various -Werror fixes
Patrick Winnertz
winnie at debian.org
Wed Mar 3 17:23:31 UTC 2010
The following commit has been merged in the master branch:
commit 6d1ed66d05c6335b34b656a2571fc07d7d4233a3
Author: Patrick Winnertz <winnie at debian.org>
Date: Wed Mar 3 18:19:09 2010 +0100
various -Werror fixes
Signed-off-by: Patrick Winnertz <winnie at debian.org>
diff --git a/debian/patches/00list b/debian/patches/00list
index 6509080..584bc3a 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -25,7 +25,7 @@ use_bash_instead_of_sh.dpatch
#lustre-snmp-missing-include.dpatch
fix-oot-builds.dpatch
#lnet-missing-prototypes.dpatch
-#fix_various_typecasts.dpatch
+fix_various_typecasts.dpatch
#build-fixes-for_2.6.18_servers.dpatch
autogen-run.dpatch
no-strict-aliasing.dpatch
diff --git a/debian/patches/fix_various_typecasts.dpatch b/debian/patches/fix_various_typecasts.dpatch
index 0dd4f47..8898975 100755
--- a/debian/patches/fix_various_typecasts.dpatch
+++ b/debian/patches/fix_various_typecasts.dpatch
@@ -5,162 +5,15 @@
## DP: as we compile now with -Werror add typecasts for the printf stuff in sanity.c
@DPATCH@
-diff -urNad lustre~/lustre/liblustre/tests/recovery_small.c lustre/lustre/liblustre/tests/recovery_small.c
---- lustre~/lustre/liblustre/tests/recovery_small.c 2009-08-13 11:31:21.000000000 +0200
-+++ lustre/lustre/liblustre/tests/recovery_small.c 2009-08-13 12:33:42.000000000 +0200
-@@ -142,7 +142,7 @@
- #define FAIL() \
- do { \
- char cmd[MAX_STRING_SIZE]; \
-- int rc; \
-+ int rc = 0; \
- \
- if (drop_arr[drop_index].name) { \
- printf("server drops next %s\n", drop_arr[drop_index].name); \
-diff -urNad lustre~/lustre/liblustre/tests/sanity.c lustre/lustre/liblustre/tests/sanity.c
---- lustre~/lustre/liblustre/tests/sanity.c 2009-08-13 11:31:21.000000000 +0200
-+++ lustre/lustre/liblustre/tests/sanity.c 2009-08-13 12:33:42.000000000 +0200
-@@ -576,7 +576,7 @@
- return(1);
- }
- if (statbuf.st_size != size) {
-- printf("size of %s: %ld != %lld\n", file, statbuf.st_size, (unsigned long long )size);
-+ printf("size of %s: %ld != %lld\n", file, (long int) statbuf.st_size, (unsigned long long )size);
- return(-1);
- }
- return 0;
-@@ -623,12 +623,12 @@
-
- ret = write(fd, NULL, 20);
- if (ret != -1 || errno != EFAULT) {
-- printf("write 1: ret %ld, errno %d\n", ret, errno);
-+ printf("write 1: ret %ld, errno %d\n", (long int)ret, errno);
- return(1);
- }
- ret = write(fd, (void *)-1, 20);
- if (ret != -1 || errno != EFAULT) {
-- printf("write 2: ret %ld, errno %d\n", ret, errno);
-+ printf("write 2: ret %ld, errno %d\n", (long int)ret, errno);
- return(1);
- }
- iov[0].iov_base = NULL;
-@@ -637,7 +637,7 @@
- iov[1].iov_len = 10;
- ret = writev(fd, iov, 2);
- if (ret != -1 || errno != EFAULT) {
-- printf("writev 1: ret %ld, errno %d\n", ret, errno);
-+ printf("writev 1: ret %ld, errno %d\n", (long int)ret, errno);
- return(1);
- }
- iov[0].iov_base = NULL;
-@@ -646,19 +646,19 @@
- iov[1].iov_len = sizeof(buf);
- ret = writev(fd, iov, 2);
- if (ret != sizeof(buf)) {
-- printf("write 3 ret %ld, error %d\n", ret, errno);
-+ printf("write 3 ret %ld, error %d\n", (long int)ret, errno);
- return(1);
- }
- lseek(fd, 0, SEEK_SET);
-
- ret = read(fd, NULL, 20);
- if (ret != -1 || errno != EFAULT) {
-- printf("read 1: ret %ld, errno %d\n", ret, errno);
-+ printf("read 1: ret %ld, errno %d\n", (long int)ret, errno);
- return(1);
- }
- ret = read(fd, (void *)-1, 20);
- if (ret != -1 || errno != EFAULT) {
-- printf("read 2: ret %ld, errno %d\n", ret, errno);
-+ printf("read 2: ret %ld, errno %d\n", (long int)ret, errno);
- return(1);
- }
- iov[0].iov_base = NULL;
-@@ -667,7 +667,7 @@
- iov[1].iov_len = 10;
- ret = readv(fd, iov, 2);
- if (ret != -1 || errno != EFAULT) {
-- printf("readv 1: ret %ld, errno %d\n", ret, errno);
-+ printf("readv 1: ret %ld, errno %d\n", (long int)ret, errno);
- return(1);
- }
- iov[0].iov_base = NULL;
-@@ -676,7 +676,7 @@
- iov[1].iov_len = sizeof(buf);
- ret = readv(fd, iov, 2);
- if (ret != sizeof(buf)) {
-- printf("read 3 ret %ld, error %d\n", ret, errno);
-+ printf("read 3 ret %ld, error %d\n", (long int)ret, errno);
- return(1);
- }
-
-@@ -741,14 +741,14 @@
- lseek(fd, 100, SEEK_SET);
- ret = write(fd, str, strlen(str));
- if (ret != strlen(str)) {
-- printf("write 1: ret %ld, errno %d\n", ret, errno);
-+ printf("write 1: ret %ld, errno %d\n", (long int)ret, errno);
- return(1);
- }
-
- lseek(fd, 0, SEEK_SET);
- ret = read(fd, buf, sizeof(buf));
- if (ret != strlen(str)) {
-- printf("read 1 got %ld\n", ret);
-+ printf("read 1 got %ld\n", (long int)ret);
- return(1);
- }
-
-@@ -765,14 +765,14 @@
- lseek(fd, 100, SEEK_SET);
- ret = write(fd, str, strlen(str));
- if (ret != strlen(str)) {
-- printf("write 2: ret %ld, errno %d\n", ret, errno);
-+ printf("write 2: ret %ld, errno %d\n", (long int)ret, errno);
- return(1);
- }
-
- lseek(fd, 100, SEEK_SET);
- ret = read(fd, buf, sizeof(buf));
- if (ret != strlen(str)) {
-- printf("read 2 got %ld\n", ret);
-+ printf("read 2 got %ld\n", (long int)ret);
- return(1);
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' lustre~/lustre/liblustre/tests/sanity.c lustre/lustre/liblustre/tests/sanity.c
+--- lustre~/lustre/liblustre/tests/sanity.c 2010-03-03 14:44:38.000000000 +0100
++++ lustre/lustre/liblustre/tests/sanity.c 2010-03-03 18:18:43.028668969 +0100
+@@ -705,7 +705,7 @@
}
-@@ -1372,13 +1372,13 @@
- rc = getdirentries(fd, (char *)&dir, nbytes, &basep);
-
- if (rc != -1) {
-- printf("Test failed: getdirentries returned %ld\n", rc);
-+ printf("Test failed: getdirentries returned %ld\n", (long int)rc);
- t_close(fd);
- return -1;
- }
- if (errno != EINVAL) {
- printf("Test failed: getdirentries returned %ld but errno is set"
-- " to %d (should be EINVAL)\n", rc, errno);
-+ " to %d (should be EINVAL)\n", (long int)rc, errno);
- t_close(fd);
- return -1;
- }
-diff -urNad lustre~/lustre/mds/handler.c lustre/lustre/mds/handler.c
---- lustre~/lustre/mds/handler.c 2009-08-13 12:33:40.000000000 +0200
-+++ lustre/lustre/mds/handler.c 2009-08-13 12:34:58.000000000 +0200
-@@ -1281,14 +1281,14 @@
- blksize = de->d_inode->i_sb->s_blocksize;
- /* body->size is actually the offset -eeb */
- if ((body->size & (blksize - 1)) != 0) {
-- CERROR("offset "LPU64" not on a block boundary of %lu\n",
-+ CERROR("offset "LPU64" not on a block boundary of %i\n",
- body->size, blksize);
- GOTO(out_file, rc = -EFAULT);
- }
-
- /* body->nlink is actually the #bytes to read -eeb */
- if (body->nlink & (blksize - 1)) {
-- CERROR("size %u is not multiple of blocksize %lu\n",
-+ CERROR("size %u is not multiple of blocksize %i\n",
- body->nlink, blksize);
- GOTO(out_file, rc = -EFAULT);
+ t_fcntl(fd, F_SETFL, O_APPEND);
+- if (!(ret = t_fcntl(fd, F_GETFL)) & O_APPEND) {
++ if ((!(ret = t_fcntl(fd, F_GETFL))) & O_APPEND) {
+ printf("error get flag: ret %x\n", ret);
+ return(-1);
}
--
Lustre Debian Packaging
More information about the Pkg-lustre-svn-commit
mailing list