[Prism54-devel] [PATCH] Eliminate compilation warnings from unused variables

Daniel Rall dlr at collab.net
Tue Nov 9 00:48:48 UTC 2004


Inlined is a patch and associated change log which removes the following
compilation warnings from unused variables:

  CC [M]  /home/dlr/src/prism54-cvs-2004-11-08/ksrc/islpci_eth.o
/home/dlr/src/prism54-cvs-2004-11-08/ksrc/islpci_eth.c: In function
`islpci_eth_transmit':
/home/dlr/src/prism54-cvs-2004-11-08/ksrc/islpci_eth.c:93: warning:
unused variable `wds_mac'
/home/dlr/src/prism54-cvs-2004-11-08/ksrc/islpci_eth.c: In function
`islpci_eth_receive':
/home/dlr/src/prism54-cvs-2004-11-08/ksrc/islpci_eth.c:359: warning:
unused variable `src'



* ksrc/islpci_eth.c
  (islpci_eth_transmit): #ifdef'd declaration of wds_mac based on
    CONFIG_PRISM54_WDS.

  (islpci_eth_receive): Moved declaration of src into CONFIG_PRISM54_WDS
    #ifdef.


diff -u prism54-cvs-2004-11-08/ksrc/islpci_eth.c-old prism54-
cvs-2004-11-08/ksrc/islpci_eth.c
--- prism54-cvs-2004-11-08/ksrc/islpci_eth.c-old        2004-11-08
16:27:45.420740311 -0800
+++ prism54-cvs-2004-11-08/ksrc/islpci_eth.c    2004-11-08
16:27:45.456735254 -0800
@@ -90,7 +90,9 @@
        struct sk_buff *newskb;
        int newskb_offset;
        unsigned long flags;
+#ifdef CONFIG_PRISM54_WDS
        unsigned char wds_mac[6];
+#endif
        u32 curr_frag;
        int err = 0;
 
@@ -356,9 +358,9 @@
        struct sk_buff *skb;
        u16 size;
        u32 index, offset;
-       unsigned char *src;
        int discard = 0;
 #ifdef CONFIG_PRISM54_WDS
+       unsigned char *src;
        struct wds_priv *wdsp = priv->wdsp;
        struct net_device *wds_dev = NULL;
        struct wds_net_local *wds_lp;




More information about the Prism54-devel mailing list