summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2014-10-14 14:59:36 -0300
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2014-10-14 15:17:49 -0300
commit97715d5f0fad67da1d8e06db8f9d5a3c1d1aa51c (patch)
tree37b1a473edb82a44fad60c055fa58b63ce23547f /tests
parent7308e3a92be0529eaff26bc488f86924db09b688 (diff)
tests/pm_rpm: fix some compilation warnings
warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/pm_rpm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 1e864372..90370c36 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -693,7 +693,7 @@ static void setup_non_graphics_runtime_pm(void)
if (fd < 0)
break;
- write(fd, "min_power\n", 10);
+ igt_assert(write(fd, "min_power\n", 10) == 10);
close(fd);
}
free(file_name);
@@ -701,12 +701,12 @@ static void setup_non_graphics_runtime_pm(void)
/* Audio runtime PM policies. */
fd = open("/sys/module/snd_hda_intel/parameters/power_save", O_WRONLY);
if (fd >= 0) {
- write(fd, "1\n", 2);
+ igt_assert(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(write(fd, "auto\n", 5) == 5);
close(fd);
}
}