Skip to content

Commit 2d87af0

Browse files
Amer-shanawanyakpm00
authored andcommitted
selftests: proc: remove unreached code and fix build warning
fix the following warning: proc-empty-vm.c:385:17: warning: ignoring return value of `write' declared with attribute `warn_unused_result' [-Wunused-result] 385 | write(1, buf, rv); | ^~~~~~~~~~~~~~~~~ Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Amer Al Shanawany <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/r/[email protected]/ Cc: Alexey Dobriyan <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Javier Carrasco <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Swarup Laxman Kotiaklapudi <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 6f3283d commit 2d87af0

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

tools/testing/selftests/proc/proc-empty-vm.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,6 @@ static int test_proc_pid_statm(pid_t pid)
381381

382382
assert(rv >= 0);
383383
assert(rv <= sizeof(buf));
384-
if (0) {
385-
write(1, buf, rv);
386-
}
387384

388385
const char *p = buf;
389386
const char *const end = p + rv;

0 commit comments

Comments
 (0)