Skip to content

Commit 8a1bda2

Browse files
committed
Assert result of write()
Fixes ``` src/umockdev.c:3724:3: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result] write (script_fd, _tmp70_, (gsize) _tmp73_); ```
1 parent 1f4728e commit 8a1bda2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/umockdev.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ public class Testbed: GLib.Object {
928928
uint8[] ev_data = new uint8[sizeof(Linux.Input.Event)];
929929
Posix.memcpy(ev_data, &ev, ev_data.length);
930930
string script_line = "r " + delay.to_string() + " " + ScriptRunner.encode(ev_data) + "\n";
931-
Posix.write(script_fd, script_line, script_line.length);
931+
assert (Posix.write(script_fd, script_line, script_line.length) == script_line.length);
932932
}
933933

934934
Posix.close (script_fd);

0 commit comments

Comments
 (0)