Changeset 80ab5f4 in rtems


Ignore:
Timestamp:
May 6, 2009, 4:37:32 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
5fd366e0
Parents:
a1d47823
Message:

2009-05-06 Joel Sherrill <joel.sherrill@…>

  • libchip/network/if_dc.c: Fixed warnings.
Location:
c/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/ChangeLog

    ra1d47823 r80ab5f4  
     12009-05-06      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * libchip/network/if_dc.c: Fixed warnings.
     4
    152009-05-03      Joel Sherrill <joel.sherrill@oarcorp.com>
    26
  • c/src/libchip/network/if_dc.c

    ra1d47823 r80ab5f4  
    11911191        struct ifnet            *ifp;
    11921192        int                     i;
     1193        u_int16_t               *ac_enaddr;
    11931194
    11941195        ifp = &sc->arpcom.ac_if;
     
    12341235
    12351236        /* Set our MAC address */
    1236         sp[39] = ((u_int16_t *)sc->arpcom.ac_enaddr)[0];
    1237         sp[40] = ((u_int16_t *)sc->arpcom.ac_enaddr)[1];
    1238         sp[41] = ((u_int16_t *)sc->arpcom.ac_enaddr)[2];
     1237        ac_enaddr = (u_int16_t *)sc->arpcom.ac_enaddr;
     1238        sp[39] = ac_enaddr[0];
     1239        sp[40] = ac_enaddr[1];
     1240        sp[41] = ac_enaddr[2];
    12391241
    12401242        sframe->dc_status = DC_TXSTAT_OWN;
     
    12631265        struct ifmultiaddr      *ifma;
    12641266#endif
     1267        u_int32_t               *ac_enaddr;
    12651268
    12661269        ifp = &sc->arpcom.ac_if;
    12671270
    12681271        /* Init our MAC address */
    1269         CSR_WRITE_4(sc, DC_AL_PAR0, *(u_int32_t *)(&sc->arpcom.ac_enaddr[0]));
    1270         CSR_WRITE_4(sc, DC_AL_PAR1, *(u_int32_t *)(&sc->arpcom.ac_enaddr[4]));
     1272        ac_enaddr = (u_int32_t *)&sc->arpcom.ac_enaddr[0];
     1273        CSR_WRITE_4(sc, DC_AL_PAR0, *ac_enaddr);
     1274        ac_enaddr = (u_int32_t *)&sc->arpcom.ac_enaddr[4];
     1275        CSR_WRITE_4(sc, DC_AL_PAR1, *ac_enaddr);
    12711276
    12721277        /* If we want promiscuous mode, set the allframes bit. */
     
    13201325        struct ifmultiaddr      *ifma;
    13211326#endif
     1327        u_int32_t               *ac_enaddr;
    13221328
    13231329        ifp = &sc->arpcom.ac_if;
     
    13251331        /* Init our MAC address */
    13261332        CSR_WRITE_4(sc, DC_AX_FILTIDX, DC_AX_FILTIDX_PAR0);
    1327         CSR_WRITE_4(sc, DC_AX_FILTDATA,
    1328             *(u_int32_t *)(&sc->arpcom.ac_enaddr[0]));
     1333        ac_enaddr = (u_int32_t *)&sc->arpcom.ac_enaddr[0];
     1334        CSR_WRITE_4(sc, DC_AX_FILTDATA, *ac_enaddr);
     1335           
    13291336        CSR_WRITE_4(sc, DC_AX_FILTIDX, DC_AX_FILTIDX_PAR1);
    1330         CSR_WRITE_4(sc, DC_AX_FILTDATA,
    1331             *(u_int32_t *)(&sc->arpcom.ac_enaddr[4]));
     1337
     1338        ac_enaddr = (u_int32_t *)&sc->arpcom.ac_enaddr[4];
     1339        CSR_WRITE_4(sc, DC_AX_FILTDATA, *ac_enaddr);
    13321340
    13331341        /* If we want promiscuous mode, set the allframes bit. */
Note: See TracChangeset for help on using the changeset viewer.