Commit 2d87af06 authored by Amer Al Shanawany's avatar Amer Al Shanawany Committed by Andrew Morton

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/20240603124220.33778-1-amer.shanawany@gmail.comSigned-off-by: default avatarAmer Al Shanawany <amer.shanawany@gmail.com>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202404010211.ygidvMwa-lkp@intel.com/
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Swarup Laxman Kotiaklapudi <swarupkotikalapudi@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 6f3283df
...@@ -381,9 +381,6 @@ static int test_proc_pid_statm(pid_t pid) ...@@ -381,9 +381,6 @@ static int test_proc_pid_statm(pid_t pid)
assert(rv >= 0); assert(rv >= 0);
assert(rv <= sizeof(buf)); assert(rv <= sizeof(buf));
if (0) {
write(1, buf, rv);
}
const char *p = buf; const char *p = buf;
const char *const end = p + rv; const char *const end = p + rv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment