test: assert/ignore some warn_unused_result's

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2016-03-15 20:42:21 +02:00
parent 02628607e0
commit 4c24f7faa8
3 changed files with 12 additions and 9 deletions

View File

@ -33,6 +33,7 @@
#include <sys/time.h>
#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@ -139,10 +140,12 @@ bench_timer_get_elapsed_time_str(struct bench_timer *self)
{
struct bench_time elapsed;
char *buf;
int ret;
bench_timer_get_elapsed_time(self, &elapsed);
normalize_bench_time(&elapsed);
asprintf(&buf, "%ld.%06ld", elapsed.seconds, elapsed.milliseconds);
ret = asprintf(&buf, "%ld.%06ld", elapsed.seconds, elapsed.milliseconds);
assert(ret >= 0);
return buf;
}

View File

@ -483,14 +483,14 @@ main(int argc, char *argv[])
sigaction(SIGTERM, &act, NULL);
/* Instead of fiddling with termios.. */
system("stty -echo");
(void) system("stty -echo");
ret = loop(kbds);
if (ret)
goto err_stty;
err_stty:
system("stty echo");
(void) system("stty echo");
free_keyboards(kbds);
err_compose:
xkb_compose_table_unref(compose_table);

View File

@ -372,9 +372,9 @@ main(int argc, char *argv[])
goto err_core_kbd;
}
system("stty -echo");
(void) system("stty -echo");
ret = loop(conn, &core_kbd);
system("stty echo");
(void) system("stty echo");
err_core_kbd:
deinit_kbd(&core_kbd);