From 85edabcb42c618d12fdf2b7a2f9b049e466b63af Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Fri, 27 Jul 2012 14:44:12 +0000 Subject: [PATCH] btrace(8): resolve Coverity warnings --- commands/btrace/btrace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/btrace/btrace.c b/commands/btrace/btrace.c index 1bacf1eb5..dbdf508e9 100644 --- a/commands/btrace/btrace.c +++ b/commands/btrace/btrace.c @@ -9,6 +9,8 @@ #include #include +static btrace_entry buf[BTBUF_SIZE]; + static void usage(char *name) { printf("usage:\n" @@ -42,7 +44,7 @@ static void btrace_start(char *device, int nr_entries) perror("ioctl(BIOCTRACECTL)"); size = 0; - ioctl(devfd, BIOCTRACEBUF, &size); + (void) ioctl(devfd, BIOCTRACEBUF, &size); exit(EXIT_FAILURE); } @@ -52,7 +54,6 @@ static void btrace_start(char *device, int nr_entries) static void btrace_stop(char *device, char *file) { - btrace_entry buf[BTBUF_SIZE]; int r, ctl, devfd, outfd; size_t size; @@ -163,7 +164,6 @@ static void dump_entry(btrace_entry *entry) static void btrace_dump(char *file) { - btrace_entry buf[BTBUF_SIZE]; int i, r, infd; if ((infd = open(file, O_RDONLY)) < 0) { -- 2.44.0