[Olsr-dev] [PATCH 09/12] p2pd: remove unused variables
Ferry Huberts
(spam-protected)
Thu Jun 9 13:42:55 CEST 2011
From: Ferry Huberts <(spam-protected)>
src/p2pd.c:412:12: warning: variable ‘vtime’ set but not used [-Wunused-but-set-variable]
src/p2pd.c:622:23: warning: variable ‘origIp’ set but not used [-Wunused-but-set-variable]
src/p2pd.c:617:22: error: unused variable ‘src’ [-Werror=unused-variable]
Signed-off-by: Ferry Huberts <(spam-protected)>
---
lib/p2pd/src/p2pd.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/lib/p2pd/src/p2pd.c b/lib/p2pd/src/p2pd.c
index 1638ffa..f8bf11b 100644
--- a/lib/p2pd/src/p2pd.c
+++ b/lib/p2pd/src/p2pd.c
@@ -409,18 +409,15 @@ olsr_parser(union olsr_message *m,
{
union olsr_ip_addr originator;
int size;
- uint32_t vtime;
//OLSR_DEBUG(LOG_PLUGINS, "P2PD PLUGIN: Received msg in parser\n");
/* Fetch the originator of the messsage */
if (olsr_cnf->ip_version == AF_INET) {
memcpy(&originator, &m->v4.originator, olsr_cnf->ipsize);
- vtime = me_to_reltime(m->v4.olsr_vtime);
size = ntohs(m->v4.olsr_msgsize);
} else {
memcpy(&originator, &m->v6.originator, olsr_cnf->ipsize);
- vtime = me_to_reltime(m->v6.olsr_vtime);
size = ntohs(m->v6.olsr_msgsize);
}
@@ -617,9 +614,7 @@ InUdpDestPortList(int ip_version, union olsr_ip_addr *addr, uint16_t port)
static void
P2pdPacketCaptured(unsigned char *encapsulationUdpData, int nBytes)
{
- union olsr_ip_addr src; /* Source IP address in captured packet */
union olsr_ip_addr dst; /* Destination IP address in captured packet */
- union olsr_ip_addr *origIp; /* Main OLSR address of source of captured packet */
struct ip *ipHeader; /* The IP header inside the captured IP packet */
struct ip6_hdr *ipHeader6; /* The IP header inside the captured IP packet */
struct udphdr *udpHeader;
@@ -709,9 +704,6 @@ P2pdPacketCaptured(unsigned char *encapsulationUdpData, int nBytes)
return; //Is not IP packet
}
- /* Lookup main address of source in the MID table of OLSR */
- origIp = MainAddressOf(&src);
-
// send the packet to OLSR forward mechanism
olsr_p2pd_gen(encapsulationUdpData, nBytes);
} /* P2pdPacketCaptured */
--
1.7.5.2
More information about the Olsr-dev
mailing list