From 67dd51606ca1670e21ce414591cc48caaf2e2e9f Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Mon, 3 Feb 2020 11:49:15 -0800 Subject: [PATCH] freedreno/fdperf: Cast away some ignored return values This is developer tool, it can crash and burn if it fails to allocate. Part-of: --- src/freedreno/perfcntrs/fdperf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/freedreno/perfcntrs/fdperf.c b/src/freedreno/perfcntrs/fdperf.c index afebc3830df..5b4488209c5 100644 --- a/src/freedreno/perfcntrs/fdperf.c +++ b/src/freedreno/perfcntrs/fdperf.c @@ -231,7 +231,7 @@ readdt(const char *node) void *buf; int sz; - asprintf(&path, "%s/%s", dev.dtnode, node); + (void) asprintf(&path, "%s/%s", dev.dtnode, node); buf = readfile(path, &sz); free(path); @@ -264,7 +264,7 @@ find_freqs(void) dev.min_freq = ~0; dev.max_freq = 0; - asprintf(&path, "%s/%s", dev.dtnode, "qcom,gpu-pwrlevels"); + (void) asprintf(&path, "%s/%s", dev.dtnode, "qcom,gpu-pwrlevels"); ret = nftw(path, find_freqs_fn, 64, 0); if (ret < 0) @@ -636,7 +636,7 @@ static void redraw_counter_value_raw(WINDOW *win, float val) { char *str; - asprintf(&str, "%'.2f", val); + (void) asprintf(&str, "%'.2f", val); waddstr(win, str); whline(win, ' ', w - getcurx(win)); free(str); @@ -1029,7 +1029,7 @@ config_restore(void) config_setting_t *root = config_root_setting(&cfg); /* per device settings: */ - asprintf(&str, "a%dxx", dev.chipid >> 24); + (void) asprintf(&str, "a%dxx", dev.chipid >> 24); setting = config_setting_get_member(root, str); if (!setting) setting = config_setting_add(root, str, CONFIG_TYPE_GROUP); -- 2.30.2