pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

gcc 4.8 warnings and xentools42



===> Building for xentools42-4.2.4nb1
...
drivers/net/epic100.c:234:9: error: variable 'full_duplex' set but not used
+[-Werror=unused-but-set-variable]
     int full_duplex = 0;
         ^
cc1: all warnings being treated as errors


epic100_open(void)
{
    int mii_reg5;
    int full_duplex = 0;
    unsigned long tmp;

    epic100_init_ring();

    /* Pull the chip out of low-power mode, and set for PCI read multiple. */
    outl(GC_RX_FIFO_THR_64 | GC_MRC_READ_MULT | GC_ONE_COPY, genctl);

    outl(TX_FIFO_THRESH, eththr);

    tmp = TC_EARLY_TX_ENABLE | TX_SLOT_TIME;

    mii_reg5 = mii_read(phys[0], 5);
    if (mii_reg5 != 0xffff && (mii_reg5 & 0x0100)) {
    full_duplex = 1;
    printf(" full-duplex mode");
    tmp |= TC_LM_FULL_DPX;
    } else
    tmp |= TC_LM_NORMAL;

So gcc 4.8.3 proved that mii_reg5 != 0xffff && (mii_reg5 & 0x0100) is
always false?

Cheers,

Patrick


Home | Main Index | Thread Index | Old Index