Get rid of warnings by using ifdef instead of putting
an attribute on a label. The sparse tool doesn't understand
attributes on labels, and the rest of the kernel doesn't do that.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

--- pro-2.6.orig/net/sched/cls_api.c
+++ pro-2.6/net/sched/cls_api.c
@@ -593,8 +593,11 @@ tcf_exts_dump(struct sk_buff *skb, struc
        }
 #endif
        return 0;
-rtattr_failure: __attribute__ ((unused))
+
+#ifdef CONFIG_NET_CLS_ACT
+rtattr_failure:
        return -1;
+#endif
 }
 
 int
@@ -611,8 +614,11 @@ tcf_exts_dump_stats(struct sk_buff *skb,
                        goto rtattr_failure;
 #endif
        return 0;
-rtattr_failure: __attribute__ ((unused))
+
+#ifdef CONFIG_NET_CLS_ACT
+rtattr_failure:
        return -1;
+#endif
 }
 
 static int __init tc_filter_init(void)

--
Stephen Hemminger <[EMAIL PROTECTED]>
OSDL http://developer.osdl.org/~shemminger

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to