[Pkg-lustre-svn-commit] updated: [c85867b] Fix typecasts in lustre/liblustre/tests/sanity.c
Patrick Winnertz
winnie at debian.org
Wed Aug 12 13:22:34 UTC 2009
The following commit has been merged in the master branch:
commit c85867b989423fd08147eb942a0a66b8c80672e6
Author: Patrick Winnertz <winnie at debian.org>
Date: Wed Aug 12 14:49:25 2009 +0200
Fix typecasts in lustre/liblustre/tests/sanity.c
Signed-off-by: Patrick Winnertz <winnie at debian.org>
diff --git a/debian/patches/00list b/debian/patches/00list
index 8dbd7a0..b428645 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -26,3 +26,4 @@ lustre-snmp-missing-include.dpatch
libcfs_wrong_includepath.dpatch
lnet-missing-prototypes.dpatch
version_tag-pl-path.dpatch
+fix_typecasts_in_printf.dpatch
diff --git a/debian/patches/fix_typecasts_in_printf.dpatch b/debian/patches/fix_typecasts_in_printf.dpatch
new file mode 100755
index 0000000..a635aee
--- /dev/null
+++ b/debian/patches/fix_typecasts_in_printf.dpatch
@@ -0,0 +1,146 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## autogen.dpatch by Patrick Winnertz <winnie at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: as we compile now with -Werror add typecasts for the printf stuff in sanity.c
+
+ at 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-12 15:02:38.000000000 +0200
++++ lustre/lustre/liblustre/tests/recovery_small.c 2009-08-12 15:03:27.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-12 14:51:47.000000000 +0200
++++ lustre/lustre/liblustre/tests/sanity.c 2009-08-12 15:02:51.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);
+ }
+
+@@ -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;
+ }
--
Lustre Debian Packaging
More information about the Pkg-lustre-svn-commit
mailing list