diff options
author | Thomas Wood <thomas.wood@intel.com> | 2015-03-25 16:42:57 +0000 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2015-03-26 15:50:59 +0000 |
commit | 47f6b1305cc3752f318a555b932e194e1500c1d8 (patch) | |
tree | 18660c1faf9eadd6ef2bcbe9730eb1fa6c5ced7f /tests/pm_lpsp.c | |
parent | 0c4dd28d2d3b39216f9d041119ebf34cc44b7df7 (diff) |
igt.cocci: check the return values of various functions
Add rules to fix unused-result warnings when compiling with
_FORTIFY_SOURCE defined and apply them to the library and tests.
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'tests/pm_lpsp.c')
-rw-r--r-- | tests/pm_lpsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/pm_lpsp.c b/tests/pm_lpsp.c index 50b3dd9cc..3ed4c7880 100644 --- a/tests/pm_lpsp.c +++ b/tests/pm_lpsp.c @@ -45,12 +45,12 @@ static void disable_audio_runtime_pm(void) fd = open("/sys/module/snd_hda_intel/parameters/power_save", O_WRONLY); if (fd >= 0) { - write(fd, "1\n", 2); + igt_assert_eq(write(fd, "1\n", 2), 2); close(fd); } fd = open("/sys/bus/pci/devices/0000:00:03.0/power/control", O_WRONLY); if (fd >= 0) { - write(fd, "auto\n", 5); + igt_assert_eq(write(fd, "auto\n", 5), 5); close(fd); } /* Give some time for it to react. */ |