We can avoid this compiler warning by using the used variable
on the if (0) branch as that is never going to happen anyway.
CC [M] /home/mcgrof/devel/compat-wireless-2.6/net/wireless/scan.o
/home/mcgrof/devel/compat-wireless-2.6/net/wireless/scan.c: In function ‘cfg80211_bss_update’:
/home/mcgrof/devel/compat-wireless-2.6/net/wireless/scan.c:422: warning: unused variable ‘used’
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
--- a/net/wireless/scan.c 2009-09-02 14:13:33.769092519 -0700
+++ b/net/wireless/scan.c 2009-09-02 14:13:34.925094548 -0700
-@@ -422,7 +422,11 @@
+@@ -422,7 +422,12 @@
size_t used = dev->wiphy.bss_priv_size + sizeof(*res);
size_t ielen = res->pub.len_information_elements;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,28)
+ if (0) {
++ used = 0; /* just to shut up the compiler */
+#else
if (!found->ies_allocated && ksize(found) >= used + ielen) {
+#endif