summaryrefslogtreecommitdiff
path: root/debian/patches/0003-linux-fix-compiler-warning.patch
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-12-19 02:06:35 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-12-19 02:06:35 +0100
commitdf667b5b58e5ae0d9479c4bc0ffb37a39b57978f (patch)
treefbf5a364a167f3b5d54457c931e14738a788d358 /debian/patches/0003-linux-fix-compiler-warning.patch
parent9f011e6defe9a3023921ff8c425a90faf4df91d5 (diff)
add patch series
Diffstat (limited to 'debian/patches/0003-linux-fix-compiler-warning.patch')
-rw-r--r--debian/patches/0003-linux-fix-compiler-warning.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/debian/patches/0003-linux-fix-compiler-warning.patch b/debian/patches/0003-linux-fix-compiler-warning.patch
new file mode 100644
index 0000000..644b172
--- /dev/null
+++ b/debian/patches/0003-linux-fix-compiler-warning.patch
@@ -0,0 +1,29 @@
+From 1febf984272cadf96e9e1c22d60fbcb5527e52c0 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Fri, 19 Dec 2014 02:02:44 +0100
+Subject: [PATCH gnumach 3/3] linux: fix compiler warning
+
+If the loop above completes at least one iteration, `i' will be larger
+than zero.
+
+* linux/dev/glue/block.c (rdwr_full): Add assertion to appease the
+compiler.
+---
+ linux/dev/glue/block.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c
+index 79a3646..da4ef38 100644
+--- a/linux/dev/glue/block.c
++++ b/linux/dev/glue/block.c
+@@ -624,6 +624,7 @@ rdwr_full (int rw, kdev_t dev, loff_t *off, char **buf, int *resid, int bshift)
+ }
+ if (! err)
+ {
++ assert (i > 0);
+ ll_rw_block (rw, i, bhp, 0);
+ wait_on_buffer (bhp[i - 1]);
+ }
+--
+2.1.3
+