From: Carsten Schlote <c.schl...@konzeptpark.de>

GCC 4.4.1 seems to have some problem with the 'ip' variable and claims it
is uninitialized. I added a fake assign to the declaration. This fixes
the problem at least.

Signed-off-by: Carsten Schlote <c.schl...@konzeptpark.de>
---
 .../dhcp-4.1.0/gcc4.4-fixup-error-warning.patch    |   22 ++++++++++++++++++++
 patches/dhcp-4.1.0/series                          |    1 +
 2 files changed, 23 insertions(+), 0 deletions(-)
 create mode 100644 patches/dhcp-4.1.0/gcc4.4-fixup-error-warning.patch
 create mode 100644 patches/dhcp-4.1.0/series

diff --git a/patches/dhcp-4.1.0/gcc4.4-fixup-error-warning.patch 
b/patches/dhcp-4.1.0/gcc4.4-fixup-error-warning.patch
new file mode 100644
index 0000000..5ed93b5
--- /dev/null
+++ b/patches/dhcp-4.1.0/gcc4.4-fixup-error-warning.patch
@@ -0,0 +1,22 @@
+[dhcp] Fix warning, which is treated as error.
+
+GCC 4.4.1 seems to have some problem with the 'ip' variable and claims it
+is uninitialized. I added a fake assign to the declaration. This fixes
+the problem at least.
+---
+ common/packet.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: dhcp-4.1.0/common/packet.c
+===================================================================
+--- dhcp-4.1.0.orig/common/packet.c    2009-11-19 15:58:41.000000000 +0100
++++ dhcp-4.1.0/common/packet.c 2009-11-19 15:59:57.000000000 +0100
+@@ -132,7 +132,7 @@
+       unsigned char *data;
+       unsigned len;
+ {
+-      struct ip ip;
++      struct ip ip = { };
+       struct udphdr udp;
+ 
+       /* Fill out the IP header */
diff --git a/patches/dhcp-4.1.0/series b/patches/dhcp-4.1.0/series
new file mode 100644
index 0000000..58ad620
--- /dev/null
+++ b/patches/dhcp-4.1.0/series
@@ -0,0 +1 @@
+gcc4.4-fixup-error-warning.patch
-- 
1.6.5.6.gb3118


--
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to