summaryrefslogtreecommitdiff
path: root/debian/patches/17_net_gcc_4.0.patch
blob: 9534738ddd1160e582525603ff751c4da1d96616 (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
#DPATCHLEVEL=0

2005-11-05  Thomas Schwinge  <tschwinge@gnu.org>

	* linux/src/drivers/net/ne2k-pci.c (ne2k_pci_block_input)
	(ne2k_pci_block_output): Fix invalid lvalue errors with gcc 4.0.


diff -Naur linux/src/drivers/net/ne2k-pci.c linux/src/drivers/net/ne2k-pci.c
--- linux/src/drivers/net/ne2k-pci.c	2005-11-28 03:34:08.000000000 +0200
+++ linux/src/drivers/net/ne2k-pci.c	2005-11-28 03:38:41.000000000 +0200
@@ -546,8 +546,10 @@
 		insl(NE_BASE + NE_DATAPORT, buf, count>>2);
 		if (count & 3) {
 			buf += count & ~3;
-			if (count & 2)
-				*((u16*)buf)++ = le16_to_cpu(inw(NE_BASE + NE_DATAPORT));
+			if (count & 2) {
+				*((u16 *) buf) = le16_to_cpu(inw(NE_BASE + NE_DATAPORT));
+				buf = (void *) buf + sizeof (u16);
+			}
 			if (count & 1)
 				*buf = inb(NE_BASE + NE_DATAPORT);
 		}
@@ -609,8 +611,10 @@
 		outsl(NE_BASE + NE_DATAPORT, buf, count>>2);
 		if (count & 3) {
 			buf += count & ~3;
-			if (count & 2)
-				outw(cpu_to_le16(*((u16*)buf)++), NE_BASE + NE_DATAPORT);
+			if (count & 2) {
+				outw(cpu_to_le16(*((u16 *) buf)), NE_BASE + NE_DATAPORT);
+				buf = (void *) buf + sizeof (u16);
+			}
 		}
 	}