The following commit has been merged in the master branch: commit 2c9280e830f1eef480f4df23d4d48c1fa5c1a8e4 Author: Sven Eckelmann sven@narfation.org Date: Fri Feb 10 12:21:55 2012 +0100
batman-adv: Fix daily check regression in blaII
9fd6b0615b5499b270d39a92b8790e206cf75833 introduced some regressions in the daily checks on open-mesh.org. Those were only visible when CONFIG_BATMAN_ADV_BLA was disabled. The reason was the usage of defines to replace the calls for not available functions. The actual c compiler is not able to distinguish between the used and unused variables because it doesn't see the function call anymore. The second problem was the use of simple subscopes where "do {} while(0)" whould have been necessary.
Signed-off-by: Sven Eckelmann sven@narfation.org
diff --git a/bridge_loop_avoidance.h b/bridge_loop_avoidance.h index 24d7f16..2758b8c 100644 --- a/bridge_loop_avoidance.h +++ b/bridge_loop_avoidance.h @@ -46,9 +46,10 @@ void bla_free(struct bat_priv *bat_priv); #define bla_claim_table_seq_print_text (0) #define bla_is_backbone_gw_orig(...) (0) #define bla_check_bcast_duplist(...) (0) -#define bla_update_orig_address(...) {} +#define bla_update_orig_address(...) do {} while (0) #define bla_init(...) (1) -#define bla_free(...) {} +#define bla_free(...) do {} while (0) +
#endif /* ifdef CONFIG_BATMAN_ADV_BLA */
diff --git a/soft-interface.c b/soft-interface.c index 7047a47..0087052 100644 --- a/soft-interface.c +++ b/soft-interface.c @@ -135,7 +135,7 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface) uint8_t stp_addr[ETH_ALEN] = {0x01, 0x80, 0xC2, 0x00, 0x00, 0x00}; unsigned int header_len = 0; int data_len = skb->len, ret; - short vid = -1; + short vid __maybe_unused = -1; bool do_bcast = false;
if (atomic_read(&bat_priv->mesh_state) != MESH_ACTIVE) @@ -256,7 +256,7 @@ void interface_rx(struct net_device *soft_iface, struct bat_priv *bat_priv = netdev_priv(soft_iface); struct ethhdr *ethhdr; struct vlan_ethhdr *vhdr; - short vid = -1; + short vid __maybe_unused = -1;
/* check if enough space is available for pulling, and pull */ if (!pskb_may_pull(skb, hdr_size))