aboutsummaryrefslogtreecommitdiffstats
path: root/stubdom/grub.patches/70compiler_warnings.diff
blob: 15181fcfaa6138adf46803daf3213262822eb31b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[ 1436s] ../grub-upstream/netboot/fsys_tftp.c:213: warning: operation on 'block' may be undefined
[ 1437s] ../grub-upstream/netboot/main.c:444: warning: operation on 'block' may be undefined

[ 1234s] E: xen sequence-point ../grub-upstream/netboot/fsys_tftp.c:213
[ 1234s] E: xen sequence-point ../grub-upstream/netboot/main.c:444

---
 netboot/fsys_tftp.c |    5 ++++-
 netboot/main.c      |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

Index: grub-0.97/netboot/fsys_tftp.c
===================================================================
--- grub-0.97.orig/netboot/fsys_tftp.c
+++ grub-0.97/netboot/fsys_tftp.c
@@ -209,8 +209,11 @@ buf_fill (int abort)
 	break;
 
       if ((block || bcounter) && (block != prevblock + (unsigned short) 1))
+      {
+	      block = prevblock;
 	/* Block order should be continuous */
-	tp.u.ack.block = htons (block = prevblock);
+	tp.u.ack.block = htons (block);
+      }
       
       /* Should be continuous.  */
       tp.opcode = abort ? htons (TFTP_ERROR) : htons (TFTP_ACK);
Index: grub-0.97/netboot/main.c
===================================================================
--- grub-0.97.orig/netboot/main.c
+++ grub-0.97/netboot/main.c
@@ -440,8 +440,11 @@ tftp (const char *name, int (*fnc) (unsi
 	break;
       
       if ((block || bcounter) && (block != prevblock + 1))
+      {
+	      block = prevblock;
 	/* Block order should be continuous */
-	tp.u.ack.block = htons (block = prevblock);
+	tp.u.ack.block = htons (block);
+      }
       
       /* Should be continuous.  */
       tp.opcode = htons (TFTP_ACK);