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/intel_reg.c | |
parent | f0381d1abebfc5b7e24a835dfe1c2344396c0304 (diff) |
build: fix unused-result warnings
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'tools/intel_reg.c')
-rw-r--r-- | tools/intel_reg.c | 3 |
1 files changed, 2 insertions, 1 deletions
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", |