apps/canutils: fix the build warning on greenhills compiler
CC: stdlib/lib_srand.c "candump.c", line 231: warning #550-D: variable "ret" was set but never used int opt, ret; ^ "candump.c", line 101: warning #550-D: variable "cmdlinename" was set but never used static char *cmdlinename[MAXSOCK]; ^ Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
parent
8cb59a75ea
commit
a6094d81bb
@ -99,7 +99,6 @@
|
|||||||
const char col_on [MAXCOL][19] = {BLUE, RED, GREEN, BOLD, MAGENTA, CYAN};
|
const char col_on [MAXCOL][19] = {BLUE, RED, GREEN, BOLD, MAGENTA, CYAN};
|
||||||
const char col_off [] = ATTRESET;
|
const char col_off [] = ATTRESET;
|
||||||
|
|
||||||
static char *cmdlinename[MAXSOCK];
|
|
||||||
static __u32 dropcnt[MAXSOCK];
|
static __u32 dropcnt[MAXSOCK];
|
||||||
static __u32 last_dropcnt[MAXSOCK];
|
static __u32 last_dropcnt[MAXSOCK];
|
||||||
static char devname[MAXIFNAMES][IFNAMSIZ+1];
|
static char devname[MAXIFNAMES][IFNAMSIZ+1];
|
||||||
@ -229,7 +228,7 @@ int main(int argc, char **argv)
|
|||||||
unsigned char logfrmt = 0;
|
unsigned char logfrmt = 0;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int rcvbuf_size = 0;
|
int rcvbuf_size = 0;
|
||||||
int opt, ret;
|
int opt;
|
||||||
int currmax, numfilter;
|
int currmax, numfilter;
|
||||||
int join_filter;
|
int join_filter;
|
||||||
char *ptr, *nptr;
|
char *ptr, *nptr;
|
||||||
@ -394,8 +393,6 @@ int main(int argc, char **argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdlinename[i] = ptr; /* save pointer to cmdline name of this socket */
|
|
||||||
|
|
||||||
if (nptr)
|
if (nptr)
|
||||||
nbytes = nptr - ptr; /* interface name is up the first ',' */
|
nbytes = nptr - ptr; /* interface name is up the first ',' */
|
||||||
else
|
else
|
||||||
@ -618,7 +615,7 @@ int main(int argc, char **argv)
|
|||||||
if (timeout_current)
|
if (timeout_current)
|
||||||
*timeout_current = timeout_config;
|
*timeout_current = timeout_config;
|
||||||
|
|
||||||
if ((ret = select(s[currmax-1]+1, &rdfs, NULL, NULL, timeout_current)) <= 0) {
|
if ((select(s[currmax-1]+1, &rdfs, NULL, NULL, timeout_current)) <= 0) {
|
||||||
//perror("select");
|
//perror("select");
|
||||||
running = 0;
|
running = 0;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user