[gPXE-devel] [PATCH] Build breakage caused by new pcnet32 driver

Geoff Lywood glywood at vmware.com
Thu Jun 24 16:02:32 EDT 2010


Using gcc 4.1.2, I get the following error when running 'make bin/pcnet32.rom':

  [BUILD] bin/pcnet32.o
cc1: warnings being treated as errors
drivers/net/pcnet32.c: In function 'pcnet32_probe':
drivers/net/pcnet32.c:516: warning: 'phycount' may be used uninitialized in this function
make: *** [bin/pcnet32.o] Error 1

Here is a patch to fix the problem.

Signed-off-by: Geoff Lywood <glywood at vmware.com>

diff --git a/src/drivers/net/pcnet32.c b/src/drivers/net/pcnet32.c
index 6bb2c1a..f845aa9 100644
--- a/src/drivers/net/pcnet32.c
+++ b/src/drivers/net/pcnet32.c
@@ -513,7 +513,7 @@ static void
 pcnet32_setup_probe_phy ( struct pcnet32_private *priv )
 {
        unsigned long ioaddr = priv->pci_dev->ioaddr;
-       char phycount;
+       char phycount = 0;
        int phy_id;
        int i;



More information about the gPXE-devel mailing list