From 589fa16c276920e8fb082a895d62cb046fd56f62 Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Wed, 14 Nov 2012 20:43:55 +0100 Subject: [PATCH] removed unused variable warnings by removing the variables Signed-off-by: Oliver Hartkopp --- bcmserver.c | 8 ++++---- can-calc-bit-timing.c | 3 +-- canlogserver.c | 6 +----- isotpserver.c | 4 ++-- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/bcmserver.c b/bcmserver.c index 1d82a63..a6a84a0 100644 --- a/bcmserver.c +++ b/bcmserver.c @@ -141,7 +141,7 @@ int main(int argc, char **argv) { int sl, sa, sc; - int i, ret; + int i; int idx = 0; struct sockaddr_in saddr, clientaddr; struct sockaddr_can caddr; @@ -228,12 +228,12 @@ int main(int argc, char **argv) FD_SET(sc, &readfds); FD_SET(sa, &readfds); - ret = select((sc > sa)?sc+1:sa+1, &readfds, NULL, NULL, NULL); + select((sc > sa)?sc+1:sa+1, &readfds, NULL, NULL, NULL); if (FD_ISSET(sc, &readfds)) { - ret = recvfrom(sc, &msg, sizeof(msg), 0, - (struct sockaddr*)&caddr, &caddrlen); + recvfrom(sc, &msg, sizeof(msg), 0, + (struct sockaddr*)&caddr, &caddrlen); ifr.ifr_ifindex = caddr.can_ifindex; ioctl(sc, SIOCGIFNAME, &ifr); diff --git a/can-calc-bit-timing.c b/can-calc-bit-timing.c index f8c04ba..c5c66b0 100644 --- a/can-calc-bit-timing.c +++ b/can-calc-bit-timing.c @@ -391,7 +391,7 @@ static int can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt) { struct can_priv *priv = netdev_priv(dev); const struct can_bittiming_const *btc = priv->bittiming_const; - long rate, best_rate = 0; + long rate = 0; long best_error = 1000000000, error = 0; int best_tseg = 0, best_brp = 0, brp = 0; int tsegall, tseg = 0, tseg1 = 0, tseg2 = 0; @@ -443,7 +443,6 @@ static int can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt) } best_tseg = tseg / 2; best_brp = brp; - best_rate = rate; if (error == 0) break; } diff --git a/canlogserver.c b/canlogserver.c index 6aeb150..6967815 100644 --- a/canlogserver.c +++ b/canlogserver.c @@ -190,7 +190,7 @@ int main(int argc, char **argv) const int canfd_on = 1; int nbytes, i, j, maxdlen; struct ifreq ifr; - struct timeval tv, last_tv; + struct timeval tv; int port = DEFPORT; struct sockaddr_in inaddr; struct sockaddr_in clientaddr; @@ -208,10 +208,6 @@ int main(int argc, char **argv) sigaction(SIGTERM, &signalaction, NULL); /* install Signal for termination */ sigaction(SIGINT, &signalaction, NULL); /* install Signal for termination */ - - last_tv.tv_sec = 0; - last_tv.tv_usec = 0; - while ((opt = getopt(argc, argv, "m:v:i:e:p:?")) != -1) { switch (opt) { diff --git a/isotpserver.c b/isotpserver.c index d1a4d49..bded0f4 100644 --- a/isotpserver.c +++ b/isotpserver.c @@ -146,7 +146,7 @@ int main(int argc, char **argv) fd_set readfds; - int i, ret; + int i; int nbytes; int local_port = 0; @@ -322,7 +322,7 @@ int main(int argc, char **argv) FD_SET(sc, &readfds); FD_SET(sa, &readfds); - ret = select((sc > sa)?sc+1:sa+1, &readfds, NULL, NULL, NULL); + select((sc > sa)?sc+1:sa+1, &readfds, NULL, NULL, NULL); if (FD_ISSET(sc, &readfds)) { -- 2.7.4