From 97715d5f0fad67da1d8e06db8f9d5a3c1d1aa51c Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Tue, 14 Oct 2014 14:59:36 -0300 Subject: [PATCH] tests/pm_rpm: fix some compilation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Paulo Zanoni --- tests/pm_rpm.c | 6 +++--- 1 file 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); } }