[Intel-gfx] [PATCH 3/8] fix warn in intel_reg_snapshot: ignoring return value of 'write'
Imre Deak
imre.deak at intel.com
Wed Oct 10 15:04:40 CEST 2012
Signed-off-by: Imre Deak <imre.deak at intel.com>
---
tools/intel_reg_snapshot.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/intel_reg_snapshot.c b/tools/intel_reg_snapshot.c
index 83e76e5..9c5fa83 100644
--- a/tools/intel_reg_snapshot.c
+++ b/tools/intel_reg_snapshot.c
@@ -25,6 +25,7 @@
*/
#include <unistd.h>
+#include <assert.h>
#include "intel_gpu_tools.h"
int main(int argc, char** argv)
@@ -32,6 +33,7 @@ int main(int argc, char** argv)
struct pci_device *pci_dev;
uint32_t devid;
int mmio_bar;
+ int ret;
pci_dev = intel_get_pci_device();
devid = pci_dev->device_id;
@@ -42,7 +44,8 @@ int main(int argc, char** argv)
else
mmio_bar = 0;
- write(1, mmio, pci_dev->regions[mmio_bar].size);
+ ret = write(1, mmio, pci_dev->regions[mmio_bar].size);
+ assert(ret > 0);
return 0;
}
--
1.7.9.5
More information about the Intel-gfx
mailing list