diff options
author | Thomas Wood <thomas.wood@intel.com> | 2015-09-07 11:32:05 +0100 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2015-09-08 16:15:16 +0100 |
commit | 1dcace30184c812f1e12ee10cc827accce140cc0 (patch) | |
tree | 97fcb91aa25b376a6ae320529da8c7785799a14c /tools | |
parent | f0381d1abebfc5b7e24a835dfe1c2344396c0304 (diff) |
build: fix unused-result warnings
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/intel_l3_udev_listener.c | 4 | ||||
-rw-r--r-- | tools/intel_reg.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tools/intel_l3_udev_listener.c b/tools/intel_l3_udev_listener.c index 261630e9..0b94c1c5 100644 --- a/tools/intel_l3_udev_listener.c +++ b/tools/intel_l3_udev_listener.c @@ -113,10 +113,10 @@ again: udev_device_unref(udev_dev); - asprintf(&err_msg, "Parity error detected on: %d,%d,%d,%d. " + assert(asprintf(&err_msg, "Parity error detected on: %d,%d,%d,%d. " "Try to run intel_l3_parity -r %d -b %d -s %d -w %d -d", loc->slice, loc->row, loc->bank, loc->subbank, - loc->row, loc->bank, loc->subbank, loc->slice); + loc->row, loc->bank, loc->subbank, loc->slice) != -1); if (daemon) { syslog(LOG_INFO, "%s\n", err_msg); goto again; diff --git a/tools/intel_reg.c b/tools/intel_reg.c index 2b3c686d..cb3b2d72 100644 --- a/tools/intel_reg.c +++ b/tools/intel_reg.c @@ -506,7 +506,8 @@ static int intel_reg_snapshot(struct config *config, int argc, char *argv[]) intel_mmio_use_pci_bar(config->pci_dev); /* XXX: error handling */ - write(1, igt_global_mmio, config->pci_dev->regions[mmio_bar].size); + if (write(1, igt_global_mmio, config->pci_dev->regions[mmio_bar].size) == -1) + fprintf(stderr, "Error writing snapshot: %s", strerror(errno)); if (config->verbosity > 0) printf("use this with --mmio=FILE --devid=0x%04X\n", |