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-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=67dd51606ca1670e21ce414591cc48caaf2e2e9f;p=mesa.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 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);