build: fix unused-result warnings

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
Thomas Wood
2015-09-07 11:32:05 +01:00
parent f0381d1abe
commit 1dcace3018
7 changed files with 22 additions and 12 deletions
+6 -2
View File
@@ -767,8 +767,12 @@ static void igt_module_param_exit_handler(int sig)
fd = open(file_path, O_RDWR);
if (fd >= 0) {
write(fd, data->original_value,
strlen(data->original_value));
int size = strlen (data->original_value);
if (size != write(fd, data->original_value, size))
igt_warn("%s may not have been reset to its"
" original value\n", file_path);
close(fd);
}
}