mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
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
1 changed files with 2 additions and 5 deletions
|
|
@ -99,7 +99,6 @@
|
|||
const char col_on [MAXCOL][19] = {BLUE, RED, GREEN, BOLD, MAGENTA, CYAN};
|
||||
const char col_off [] = ATTRESET;
|
||||
|
||||
static char *cmdlinename[MAXSOCK];
|
||||
static __u32 dropcnt[MAXSOCK];
|
||||
static __u32 last_dropcnt[MAXSOCK];
|
||||
static char devname[MAXIFNAMES][IFNAMSIZ+1];
|
||||
|
|
@ -229,7 +228,7 @@ int main(int argc, char **argv)
|
|||
unsigned char logfrmt = 0;
|
||||
int count = 0;
|
||||
int rcvbuf_size = 0;
|
||||
int opt, ret;
|
||||
int opt;
|
||||
int currmax, numfilter;
|
||||
int join_filter;
|
||||
char *ptr, *nptr;
|
||||
|
|
@ -394,8 +393,6 @@ int main(int argc, char **argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
cmdlinename[i] = ptr; /* save pointer to cmdline name of this socket */
|
||||
|
||||
if (nptr)
|
||||
nbytes = nptr - ptr; /* interface name is up the first ',' */
|
||||
else
|
||||
|
|
@ -618,7 +615,7 @@ int main(int argc, char **argv)
|
|||
if (timeout_current)
|
||||
*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");
|
||||
running = 0;
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue