mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-24 06:43:01 +00:00
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>
This commit is contained in:
+2
-2
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user