From: Kristian H. Kristensen Date: Mon, 3 Feb 2020 19:49:15 +0000 (-0800) Subject: freedreno/fdperf: Cast away some ignored return values X-Git-Tag: upstream/20.1.8~3731 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=67dd51606ca1670e21ce414591cc48caaf2e2e9f;p=platform%2Fupstream%2Fmesa.git freedreno/fdperf: Cast away some ignored return values This is developer tool, it can crash and burn if it fails to allocate. Part-of: --- diff --git a/src/freedreno/perfcntrs/fdperf.c b/src/freedreno/perfcntrs/fdperf.c index afebc38..5b44882 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);