can-utils: fix unused variable warnings
As pointed out by Gary Bisson clang complains about unused variables in some valid cases. Reported-by: Gary Bisson <gary.bisson@boundarydevices.com> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>pull/209/head
parent
8df3d1dd3f
commit
2c87dcf468
|
|
@ -135,7 +135,7 @@ void childdied(int i)
|
|||
wait(NULL);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
|
||||
int sl, sa, sc;
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ static char *vdl = LDL; /* variable delimiter */
|
|||
static char *ldl = LDL; /* long delimiter */
|
||||
|
||||
void print_snifline(int slot);
|
||||
int handle_keyb(int fd);
|
||||
int handle_keyb(void);
|
||||
int handle_frame(int fd, long currcms);
|
||||
int handle_timeo(long currcms);
|
||||
void writesettings(char* name);
|
||||
|
|
@ -367,7 +367,7 @@ int main(int argc, char **argv)
|
|||
currcms = (tv.tv_sec - start_tv.tv_sec) * 100 + (tv.tv_usec / 10000);
|
||||
|
||||
if (FD_ISSET(0, &rdfs))
|
||||
running &= handle_keyb(s);
|
||||
running &= handle_keyb();
|
||||
|
||||
if (FD_ISSET(s, &rdfs))
|
||||
running &= handle_frame(s, currcms);
|
||||
|
|
@ -398,7 +398,7 @@ void do_modify_sniftab(unsigned int value, unsigned int mask, char cmd)
|
|||
}
|
||||
}
|
||||
|
||||
int handle_keyb(int fd)
|
||||
int handle_keyb(void)
|
||||
{
|
||||
char cmd [25] = {0};
|
||||
int i, clen;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
#define COMMENTSZ 200
|
||||
#define BUFSZ (sizeof("(1345212884.318850)") + IFNAMSIZ + 4 + CL_CFSZ + COMMENTSZ) /* for one line in the logfile */
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
char buf[BUFSZ], timestamp[BUFSZ], device[BUFSZ], ascframe[BUFSZ];
|
||||
struct canfd_frame cf;
|
||||
|
|
|
|||
Loading…
Reference in New Issue